All Questions

1
vote
1answer
65 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
51 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. ...
2
votes
1answer
158 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
52 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
106 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 ...
1
vote
1answer
124 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
22 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'...
1
vote
0answers
25 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 -...
89
votes
9answers
13k views

Why should I use dependency injection?

I am having a hard time looking for resources on why I should 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 ...
0
votes
0answers
79 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
65 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
108 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
115 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
146 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
32 views

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

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?
0
votes
2answers
93 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
95 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
56 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
69 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
24 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
35 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
48 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
30 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 [closed]

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
27 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 ...
3
votes
3answers
135 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
174 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
91 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 ...
10
votes
4answers
426 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
45 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())...
1
vote
1answer
54 views

Managing a third party library that is used by multiple independent libraries

I am working on configuring the build environment for a C++ project that uses multiple libraries. These libraries are independent of each other, but they all depend on the same 3rd party library (...
1
vote
3answers
139 views

What are the differences between Threadpool and Object Pool patterns?

I was going through the ThreadPool pattern and it resembled the Object Pool pattern. The only difference that I can think of is that most explanation about the ThreadPool explicitly mentioned the use ...
-2
votes
1answer
82 views

Calculating longest trip [closed]

I have been stuck on this question for some time. Could you guys direct me or point me to the right direction for solving this problem ? We would like to encourage passengers to experience the joy of ...
0
votes
0answers
14 views

controlling multiple components in web application

In my small web application (about 3k lines) my UI is composed of lots of buttons, toolbars, selection boxes, tables etc. Where each action affects the state of multiple UI elements. Do you ...
0
votes
0answers
27 views

How to debug Icalendar URL in Google Calendar

I'm developing a ICalendar service. If i add the URL in outlook everything looks correct, but if i import the URL in Google calendar it does not show the description of event. As google calendar ...
0
votes
0answers
88 views

Who is the copyright holder when GLPv2 project API is used? [migrated]

I've read a lot of articles and still can't find the answer to the following question. There is a project that uses GNU General Public License version 2 license, developed by CompanyX. We (...
-2
votes
0answers
14 views

Overview of how to build an “Actions/Activity” feature like the one in trello, where all actions are displayed in a last in time descending order

If I wanted to build a feature into my app as the one in trello where the latest actions of the team are displayed in a list order in descending (time). How would you design such a system to track ...
0
votes
1answer
29 views

Client (app-server) vs DB generated unique ID's

I've been reading on instagram's approach to generate unique identifiers. Besides remaining content I'd like to understand on of the points their making as a con of client-generated (by client I mean ...
0
votes
1answer
93 views

C++ naming convention for files within namespaces

I am currently working on a C++ project with a source file structure like this (headers excluded): src/ ├── namespace1/ │ ├── namespace1_base.cpp │ ├── namespace1_derived1.cpp │ └── ...
3
votes
3answers
194 views

When to use xxxResult return value pattern?

I have one method which need to return multiple values whether it was successful or not, what the key used to call the api and if successful the return result. Here is more concrete method, public ...
1
vote
1answer
65 views

Trying to understand Sequence Diagram

I am trying to understand two sequence diagrams that I have found in the SE course at university of Washington. Can you confirm if my understanding is correct ? Diagram 1: According to my ...
0
votes
1answer
100 views

DDD - Factory or Service?

I'm new to DDD, and I'm confused at the very start of my DDD project. To setup a context, I'm building the user management part of my app, so I'm building my Account entity, which contains an Id, a ...
0
votes
0answers
26 views

Updates and new functionalities in my App

I am currently working on an android app and want to implement more functions in the future for this app. Most devices are set for an automatic update cycle and keeps getting the newest version of an ...
1
vote
1answer
68 views

Where and how to connect to external API in my service class?

In my service class I would like to connect to external API. Where and how should I do it? 1) Inject in constructor ExternalClass and assign to private property. Next in other property in constructor ...
1
vote
1answer
32 views

Dictionary Application: Suggestions for serialization format and data structure

I want to create a dictionary application. One of the design guideline is performance in querying and showing up the definitions of words. I would like some suggestions on two design choices: Which ...
4
votes
1answer
142 views

Wrapping utility classes and injecting them for unit testing purposes

I found that it is so hard to test classes that depend on other utility classes as java.nio.file.Files. It is also impossible to mock them using the classic unit testing stack (junit,mockito,..) ...
0
votes
3answers
66 views

Modelling recurring events

I am in the process of writing a web app to track expenses and which will be multiuser. Everything is fine with a single expense, but I am struggling to find the best way to represent recurring ...
0
votes
3answers
48 views

How to keep relationship integrity with Microservice Architecture

Currently when I build applications, I build them as one big monolithic application such that everything resides in a single compiled assembly and the data resides in one single SQL database (with ...
-4
votes
0answers
22 views

Design multithread solution for scheduling tasks

Design and implement following . Suppose have 10 resources and 5 threads how do you design so that threads asking for Resources should be done in order. Eg t1 asks for 3 resources, t2 asks for 4 ...
0
votes
0answers
42 views

Strategies for integrating a sequential program with an event driven API

For simplicity of the question, we have: Object Class: Data_1 Data_2 Data_3 FunctionRequest(); FunctionGet(); Program Loop: {//loop x.FunctionRequest(); //short wait ...

15 30 50 per page