All Questions

0
votes
0answers
2 views

Referencing entity inside aggregate by local ID

How do you properly reference an entity inside an aggregate? For example, by the index of a list (doesn't seem smart if you re-order the list); a GUID (thought it was supposed to be local?); or some ...
-2
votes
0answers
11 views

How do I convert invalid value to 0? C# [on hold]

Hi :) I am beginner with C#. On input I have array filled with numbers. If someone accidentaly put invalid value e.g. word or punctuation I need to convert it to number 0 instead. Thank you very much! ...
-4
votes
0answers
40 views

Good Software Architecture (Java) [on hold]

Is there a book or course on good software design? Where I'm coming from: I recently worked on a project that overshot its deadline by more than a year because it was designed and implemented by ...
-1
votes
0answers
29 views

Does driver-device interaction from one operating-system environment affect the driver-device interaction on another operating-system environment?

I'm working on another tutorial: if l used a computer with an SSD-hard-drive containing an instance of Ubuntu 18.04 LTS installed with a set of Nvidia GPUs loaded with the Nvidia-CUDA toolkit but ...
0
votes
1answer
35 views

How you can deal with making invalid a list of JWTs?

I design a new Rest API for a personal project and I am trying to implement the authentication and authorization mechanism as a separate project, so I ended up with a couple of problems which I am ...
-1
votes
1answer
34 views

How to ensure separation and inward dependencies between architectural layers in Python?

Suppose a large-scale project is being developed in Python 3.7. Some layered architecture is chosen: "clean architecture", "onion" or "hexagonal". The Dependency rule in it only allows inward-...
3
votes
2answers
129 views

Does the output of a compiler depend on the OS you are using?

In the company I am working in we have a management software, written by an external programmer. Let's call the software PK. PK was initially written in the 90s using C++. Since then it was regularely ...
4
votes
2answers
115 views

How to maintain a low dependency version of a project?

I am not as technically skilled as most people asking here. I use git to backup my own work to an online repository, but I rarely use it in collaboration, and don't know much more than the basic ...
2
votes
2answers
64 views

Where to implement method to make a logical copy of an object

I am busy developing code that processes a bunch of objects that represent monthly reports for regions (e.g. one instance per region per month). Let's call them RegionMonthlyReport objects. At the end ...
32
votes
4answers
4k views

Is it ever okay to use lists in a database?

I've been trying to design a database to go with a project concept and ran into what seems like a hotly debated issue. I've read a few articles and some stackoverflow answers that state it's never (or ...
0
votes
0answers
16 views

Is it a good idea to wrap Material-UI Typography components in <H1>, <H2> components etc?

I love the Material-UI library, but some things that I've found annoying: I find Typography too long to write out, especially when I'm having to specify things like gutterBottom, align, etc. Whereas ...
0
votes
0answers
27 views

Releasing modified LGPL code [on hold]

Say I have been using an LGPL licensed library in my (proprietary) application. I am distributing it along with my application for ease of installation for users. AFAIK, this is allowed by the LGPL ...
0
votes
1answer
42 views

Create and implement new encoding

I'm working on a project with huge files that contain only the set {[0-9],.}. Encoding in UTF-8 or ASCII make huge files. I wonder if I could find a way to encode in only 4 bits (make those file 16 ...
0
votes
1answer
75 views

How does disk wiping software access my hard disk?

I'm an amateur programmer. I have a lot of interest in the inner workings of operating systems, a subject that I've been reading a lot about. What I've understood about kernels is that on most ...
-1
votes
0answers
66 views

Is it possible for a rust programming language to develop an Operating system?

I just want to know . rust is said to be system programming language then, is it possible for rust programming language to develop an Operating system and all the necessary driver without using C or C+...
0
votes
1answer
20 views

Reuse JSE checked exceptions as unchecked

Actually what i'm doing in my code base is duplicating already existing java checked exceptions like MalformedURLException.class by keeping the same exception name while inheriting from ...
4
votes
1answer
68 views

Concurrent fault-safe data structure

I am building an application that aims to process ~10M data items per second. Each item is exactly 42 bytes small (including a sorting key) which means the total data rate will not be big 420 MB/s. ...
-3
votes
0answers
25 views

Partners to access and execute operation in database

I have an express API that use a simple structure, folder routes (it has route files inside) and controllers, each route has a controller, so a controller(controllers for routes, not for models) can ...
1
vote
1answer
49 views

Common Code for Transformation of an Entity

My api is exposing information centering around an entity Company. Companies are complex, and can contain Vendors directly, or can contain sub-companies which contain vendors themselves. A consumer ...
0
votes
1answer
47 views

Design Patterns for an expression project

I have the implemented a calculator that is very similar to the following UML diagram. The only new thing is a new class, a Recognizer class, that says if the expression is written correctly or not. ...
0
votes
1answer
104 views

Is it a good idea to have type safe equals

To me, equals() between objects of inconvertible types is one of the most useful IntelliJ inspection. It's almost never intended to have objects with different types equal to each other. I ...
0
votes
1answer
38 views

MVVM/WPF/Appropriate place for code

I have a question about MVVM design, and where I should put some code that I would like to add. My application queries active directory for computers and displays the list to the user. Selecting a ...
1
vote
1answer
77 views

Using “On” at the start of a method name

From what I've observed, methods that start with the word "On" fall into two categories: A base class that defines an event will expose a protected method whose name starts with "On" followed by the ...
0
votes
1answer
98 views

Is this a valid site architecture?

We have a legacy site that was written a while back using MVC. It's a valid MVC for the most part except for the Data Access Layer. The site has Models, Views, and Controllers. However, instead of ...
0
votes
0answers
21 views

Dynamic data aggregation in a microservice architecture

I've recently started learning about microservice architecture. API gateway is a pattern usually proposed for aggregating data from different microservices which own their data stores. However I wasn'...
0
votes
0answers
22 views

avoid passing dbsession object to multiple modules

I have a project which has a service-oriented architecture. for example, anything relates to payment is inside payment module. -dao -config -constatnts -middlewares -modules -payment -user -...
49
votes
8answers
7k views

Why should I use dependency injection?

I am having a hard time looking for resources on why should I use Dependency Injection. Most of the resources that I see explains that it just passes an instance of an object to another instance of an ...
-2
votes
0answers
23 views

Reading from Keysight scope to MATLAB

I'm having an issue with data acquisition from an oscilloscope. MATLAB captures values that are over the limit of 255 for BYTE format and 65,535 for an unsigned 16-bit integer when using the WORD ...
0
votes
0answers
62 views

Software Architecture with C# and WPF

We have the need to develop an offline desktop application for a measurement equipment. While having quite a bit of experience in C++, We are new to WPF and VS in general. This software will have a ...
-2
votes
1answer
53 views

Why are ReactiveX Operators considered functional?

I'm struggling to understand how a ReactiveX operator can be considered functional. Operators are implemented as functions, but but with the exception of simple operators like map and reduce many of ...
0
votes
2answers
98 views

DRY TDD + unit testing

Where/how do you draw the line for unit-testing classes at different levels of a hierarchy? For example, let's say you have a structure like this: public class Account { public Money ...
0
votes
1answer
104 views

Breaking a website into a bunch of micro services

Imagine we have a website happy-cooking-together.com. (I made it up so if becomes available all of a sudden don't take it for real.) It's getting quite a lot traffic and multiple teams are working on ...
3
votes
1answer
134 views

Are international UTF-8 e-mail addresses a thing or not?

RFC6530 defines the necessary steps for "international e-mail" (i.e., especially for UTF-8 e-mail addresses). Apparently Google adopted the RFC back in 2014 (source). Still, most validators I find on ...
-3
votes
0answers
28 views

Graph clustering based on the attributes in nodes and edges [on hold]

I am looking for a clustering algorithm that can cluster network based on attributes in edges and nodes at the same time. Could you help me if you have anything in your mind?
-1
votes
3answers
172 views

I find refactoring code at the end of my project quite boring - what can I do to find motivation? [on hold]

I absolutely love building games using the JavaScript canvas tool, but when I'm finally done with my game/project, and I need to refactor a few of the "stupid" parts, so to say, I feel REALLY ...
0
votes
2answers
81 views

Estimating Projects which are still unclear [duplicate]

The title says it all really. If asked to produce an estimate for a project when is still very unclear what the system is, what do you do? Would you refuse to provide an estimate? Or inflate it ...
0
votes
2answers
91 views

How to unit test device driver initialization?

I am writing an IMU device driver in C using test-driven development methodology. As part of the driver, I pass a struct with user selected configuration settings to an initialization function which ...
0
votes
1answer
53 views

Circular dependency exists logically or physically and can be it broken with IDs?

So ran into an issue with circular dependency that looked like this: public class A { public List<B> Bs { get; private set;} public void AddB(B b) { Bs.Add(b); } ...
2
votes
1answer
66 views

Passing DI container to a factory – is this always an antipattern?

Generally I would always answer "yes" to this question, because at this point, your DI container has become a service locator, and you're losing the benefits of DI. However, I wonder if it is ...
-2
votes
0answers
22 views

How to validate a script that manages application status?

I have written a script that periodically checks if my applications are running in my system (several VM and routers) and if there are some problems it executes a recovery solution (I didn't have any ...
0
votes
0answers
34 views

Speed up code completion in QtCreator

I'm developing a GUI in Qt Creator 4.7.2. I installed it using the standard online installer form here. My MainWindow class now contains ~10.000 lines of code. It is now extremely annoying to ...
0
votes
0answers
41 views

Managing heterogeneous data

The underlying problem is one I seem to run into a lot. You have a collection of objects with some things in common, but other information about the objects may apply to some of them but not to others....
0
votes
0answers
26 views

Best practices on complying with BSD 2-clause in go project

I'm building a go project that will be opensourced under MIT license and publicly distributed in a binary format within a docker image. I'm using a library with BSD 2-clause license that states: ...
-2
votes
0answers
39 views

Creating a tree structure of divs in HTML [on hold]

To start with, here is the UI example to illustrate the expected UI for my website. Basically, this UI is going to list files inside a directory, including all sub-directories. So, it will look ...
-4
votes
0answers
24 views

Linked List update priority

So i have created a linkedlist from scratch which inserts and sorts via priority. The last method i need to add is an update priority method. I have a findNodeByID method which finds a node based on ...
1
vote
2answers
73 views

Drawing lines with dashes in logs

It can sometimes ease readability to "draw" lines in a logfile: for example, noise noise ----------------------------- Starting Operation ABC blabla blabla ----------------------------- End of ...
2
votes
3answers
149 views

“Duck-type-y” interface/implementation

I do not know the "correct" name of that pattern, so I'd like to describe it with a simple example. In C#, System.Windows.Window contains a ShowDialog method. I can define an interface containing ...
0
votes
2answers
72 views

May Domain Events handlers lead to new events?

I want to understand the consequences of allowing handlers to be direct or indirect source of new domain events. In all examples I see in the literature Domain Events are usually published by ...
8
votes
4answers
283 views

How to make better code reviews when pull requests are large?

Disclaimer: There are some similar questions, but I didn't find any which touch specifically the problems you face while reviewing a large pull request. Problem I feel my code reviews could be done ...
0
votes
0answers
33 views

Does the fact that random.sample(seq, 1)[0] === random.choice(seq) mean that both functions should have the same precondition on seq?

I've read https://bugs.python.org/issue33098, which is about the following behavior of Python 3 a = {'1': 42, '2': 84} # keys are str on purpose, c.f. the issue import random random.choice(a.keys())...

15 30 50 per page