All Questions

0
votes
0answers
8 views

Inventory Management Architecture - Databases/Threading?

Inventory management for a company is always single threaded? I am currently trying to explore possible solutions or workarounds for a new Inventory/stock management solution. How is amazon doing ...
-1
votes
0answers
4 views

When dividing a mongodb document into is justified?

I'm developing an app in which a user has a set of core data (username/password etc. which are filled at the signed up) a profile of essential data which user is obliged to filled later on a ...
-1
votes
0answers
3 views

Design of a Distributed System to Uniquely Assign Identifiers to Each Node

Let's say I want to design a distributed system whose only purpose is to assign each running node a unique identifier in some small range (Say, 5-100 nodes into a 10 bit identifier). When a node is ...
-3
votes
1answer
19 views

How do you create a table in Python?

I am doing on online course and the way they are creating a table is: variable = Table.read_table('filename') variable When I do this (with my own .csv file), I end up getting an error that says: ...
-1
votes
0answers
18 views

Is putting related functions into a stateful class just for testability purposes a code smell?

Take the following JavaScript module as an example of a utility class helper file that exposes many related utility functions. This module initializes the state of module and the exported functions ...
0
votes
0answers
7 views

Service Design - Data-orientation vs. Role/Goal-orientation

For a simple web application, I am designing web services to expose the application functionality (mostly data storage / retrieval, but also data processing). As the application is not too complex, I ...
0
votes
0answers
5 views

Cross-aggregate operations, use domain service or domain events?

I'm refactoring a settlements module in a large healthcare application. I'm trying to follow DDD. Let me give you a short and simplified description of the refactored code: A patient has an ...
-2
votes
0answers
21 views

Placement of Lifecycle Hooks

When using lifecycle hooks in Angular 2+, I struggle to place the ngOnDestory() function. I got the 2 sets in mind here: Either the first iDoSomething() is placed wrong or the second. export class ...
0
votes
1answer
120 views

Wrong use of factories in Java libraries? [on hold]

Some of the Java libraries I have used so far seem to have a Factory for seemingly every other class in the library. Apache's FTP Server project, for example, provides a UserManagerFactory class which ...
0
votes
0answers
11 views

Handling coherent state changes in DB through API

A simplified version of my DB: Appointment id INT PK datetime DATETIME AppointmentChangeRequest id INT PK user_id INT FK appointment_id INT FK request_datetime DATETIME ...
1
vote
3answers
144 views

what is the best way to write a recurring code with different enums

Basically what this code does is to determine whether the user is allowed access to the page or not from list of pages as enum, each one has the role name as its name and the page name inside it. The ...
8
votes
4answers
2k views

Why use trailing newlines instead of leading with printf?

I heard that you should avoid leading newlines when using printf. So that instead of printf("\nHello World!") you should use printf("Hello World!\n") In this particular example it does not make sense,...
0
votes
1answer
34 views

how to model 2 objects that refer to each other in the DB

Now I have 2 objects which are "PROBLEM" and "SOLUTION", obviously "SOLUTION" is a proposed solution to a given "PROBLEM", my problem is that in my business I have the following relations: 1- a "...
-2
votes
0answers
13 views

print the fields of an empty form that is manually inserted in the printer, values taken from the web app [on hold]

I have a web app(django based) where user fills 2 different form. I have the hard copy of the forms. Both forms have different format ex: The position of the field for name is on the center left in ...
2
votes
1answer
91 views

Unit Testability of Builder pattern

I'm looking at the builder pattern for helping setting up dependencies and parameters that may require complex logic for a class. But from the examples I've seen, the builder pattern does not seem ...
-3
votes
1answer
89 views

My question about ACS (Australian Computer Society) Code of Professional Conduct

Just think if there is a situation like this, A client directly make a call to the junior developer and ask him to do some changes in the developed system, I just want to know whether he (the ...
-3
votes
0answers
32 views

Deep learning beginner project in neurology?

I seek to work on a deep learning project in the field of neurology, with required knowledge not notably greater than that offered in Andrew Ng's courses. An existing project applies deep learning to ...
0
votes
0answers
21 views

Create clean/blank MacOS filesystem for testing OSS

In developing/testing OSS libraries I can replicate a clean Linux fs using containers. However, if I want to test oss libs for MacOS end users, I seem to be in a bit of a quandary. Is there any way to ...
-1
votes
0answers
16 views

Create web app, android app and ios app

I am am apprentice who primarily works in .NET, ASP etc with my main language being C#. My question is fairly simple, and I couldn't really think of a way to search it other than to ask it. ...
0
votes
2answers
71 views

In which way Haskell limit side effects?

From what I gathered from learning Haskell, functional programming limits the amount of side effects, but in what ways? Hope someone can enlighten me on this one.
1
vote
0answers
49 views

Is there a name for a “multi-instance singleton pattern” — returning a reference for a same-valued object?

I am tasked to write an assembler in C, which lends itself sufficiently well in certain design-pattern scenarios, and in a parsing phase, after tokenization, I need to "fill-in" certain information ...
0
votes
1answer
27 views

Modeling entities for company invoice management software

I am making a software to store all my company invoices (and then infer some statistics about it). The idea is: My company issues invoices to it's clients. My company receive invoices from it's ...
2
votes
2answers
33 views

PHP Sort question

I have a camera based security system that uploads all its images via FTP to a folder in one of my hosting accounts. (FYI, I use it to watch my cats when I'm traveling). So I created a PHP file to ...
1
vote
1answer
43 views

Using generics on interfaces when implementation is not generic

Is it acceptable practice to put generics on an interface when the implementation will not be generic? Lets say that my project will have many classes that read data from the database. I may make a ...
-1
votes
0answers
12 views

Is there a name for the 'application class' pattern used by python's Sphinx package?

As background, I learned to code Java in many years ago in high school and everything I have learned since then I picked up on my own. Currently I code in python, and I have decent experience in ...
0
votes
1answer
22 views

Define multiple DDD events or just one XXXChanged event when using CQRS?

Is it preferable to define a single 'container event' like below: trait UserStatus case object Active extends UserStatus case object Inactive extends UserStatus case class UserStatusChanged(...
0
votes
1answer
395 views

Why does the Square–Rectangle problem violate SOLID principles?

My previous question was just with class diagram and because of some comments I thought I try to find an example with a little piece of code for the diagram to see if principles correct understood? ...
0
votes
0answers
17 views

Does your web app accesses the backend directly or through an API?

I am trying to understand the use of APIs, so allow me to ask my question using an example. Let's assume I have a database with flight data and I want to make a web app where users can search, select, ...
-2
votes
1answer
46 views

looking to solidify understanding of OOP principles

I just wanted some feedback on my definitions of these terms. Abstraction - only showing relevant information and hiding implementation details. Interfaces and abstract classes are an examples of ...
0
votes
1answer
42 views

Why does YouTube save Restricted Content filter locally?

I was scrolling down on my YouTube Homepage and found that beside the filter marked Restricted Content, a point mentioned that the setting of this filter applies to this browser only. Here's the ...
-2
votes
0answers
20 views

Multi-client web-app structure [duplicate]

I'm starting a new web application, and I'm considering how to design it for multiple clients. Each client would have a completely separate interface on a different subdomain, but this can be hard to ...
0
votes
2answers
34 views

Void Or Other Result In DDD Operation

If this is basic question sorry , but anyway it is a question . i am doing domain driven design , i know about RootAggreegate , Anemic model , Rich Model , Domain Services , and ... but still when ...
0
votes
1answer
40 views

Shell Script does not capture values inside ENDSSH

I am very new to writing Shell scripts and am trying to write a simple script to run Vagrant up then SSH into the box and run some commands. The echo Hi there will run but the read -p will never show. ...
1
vote
1answer
47 views

Design pattern for common properties: static properties or a separate single instance class?

I need to create properties that have values common to instances of a class. I'm unsure how to solve this problem, so I could use some help. (This is in C#, but isn't a language-specific question.) I'...
1
vote
0answers
21 views

Domain Service vs Domain Events

What is the difference between using domain services and domain events? The thing I can see is that domain events allow you to further decouple your domain model and get away from using domain ...
1
vote
1answer
35 views

Logging patterns from within library code

I am looking for a design pattern for logging from within library code. Suppose I have a function in a library file that i expect will be used by multiple front-ends (lets assume a CLI and a web): ...
-3
votes
0answers
16 views

Cross-Platform Application with modular UI

I'm currently searching for a programming langage or a framework to make a cross-platform desktop application (Windows + Linux) This app has already been made in C++ .NET, so only on windows. I ...
1
vote
0answers
47 views

How can I resolve circular dependency within service layer in a n-tier architecture system?

I am currently starting a new project with a 4-tier architecture design. The layers is set as follow. +------------------+ +---------...
0
votes
2answers
249 views

Which SOLID principles are broken by this class diagram?

I just read about all the 5 principles S,O,L,I,D and I like test it in little example if I understand them correct. Which SOLID principles are hurt by this class diagram? I think what is broken is ...
1
vote
0answers
41 views

What algorithms does Hunspell use?

I am trying to make a spell checker for Kurdish. The problem is, Kurdish is an agglutinative language. It has suffixes, prefixes, and infixes. So a normal Hunspell dictionary could contain thousands ...
0
votes
0answers
17 views

DataTable Processing: Want lowest result

(Hi there, not entirely sure if this is the right place to ask, sorry if it isn't!) I am knocking up a fairly quick and dirty Visual Basic.NET application that essentially is a DB UI for my day job, ...
0
votes
2answers
50 views

Singleton's applicability clarification

According to the GOF Design patterns' book, singleton pattern should be used when: there must be exactly one instance of a class, and it must be accessible to clients from a well-known access ...
0
votes
0answers
17 views

How to do pagination while page gets populated dynamically

I have a page where I list some products based on search data. The products shown are not saved in local database, but are taken live using API (and this is how it has to stay). When page loads, it ...
-2
votes
0answers
28 views

How to maintain a web application for different clients with different UI and several customized functions?

We have an web application that mvc architecture and written in php. This application is used by different client that need different UI and also several module customization. This application is ...
-2
votes
1answer
65 views

How can I unit test this code

How can I unit test a codebase which contains classes that includes two or three methods. In general these methods are too long. The methods contain lots of tasks like filtering datasets and a ...
23
votes
4answers
4k views

Is there an industry standard for Gender model other than male and female? [on hold]

I am modeling a database that should be used as generic non-functional requisite for all services of the startup company, like persons, users, services and commercial data like coupons, signature ...
0
votes
5answers
193 views

How to avoid the continuous downcasting in this case?

I have an abstract class Dog and multiple subclasses (Beagle, Labrador, Bulldog...) extendig it. I have a DogHouse that can store a Dog. My problem is that when I put for example a Beagle into a ...
0
votes
2answers
70 views

How can I force an object that respects an interface to output a certain data type / structure with its functions?

This is exactly my code, I'm just stripping out everything that isn't needed: First of all, I met this issue a lot of times and something tells me that it's something to do with PHP itself and "data ...
2
votes
2answers
103 views

malloc on different platforms

I am testing a red-black tree implementation (repository) and I find that with Windows 10 and gcc, malloc starts returning NULL after inserting approx. 50 million nodes but on Linux it works at least ...
0
votes
4answers
72 views

Design pattern for creating object hidden from client

I am having difficulty understanding which design pattern would be best for the following scenario. An application uses a database. That database can either be the production version (SQL) or a test ...

15 30 50 per page