Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [design]

Questions about problem solving and planning for a solution through software design.

1
vote
2answers
36 views

Problem in modelling this because too slow calculation (robot football)

I like to build a component connector view / UML diagram for the given problem but I realized it's way too slow if you try to do it exactly as it's given in the following text. My question is what ...
1
vote
0answers
47 views

Passing a list of base class objects to a method and using instanceof to filter them

I'm working on a Java reverse engineering project, where I am analyzing bytecode and trying to identify classes, methods and fields using the ASM framework. After identifying these I transform some ...
-1
votes
0answers
11 views

implanting my csv file in tensorflow Playground Webapp [on hold]

I am here to discuss the Tensorflow Playground Webapp. I want to visualize my data inside the tensorflow playground webapp. The webapp uses 2 inputs and one output. I want to use 7 inputs and 1 ...
13
votes
8answers
2k views

On a once a day user action: 24 Hours Reset vs. Midnight Reset

When a user is able to perform an action only once a day, for example getting a free ticket for a competition, there are two possibilities I came across in my experience. 1) 24 Hours Reset If he ...
-5
votes
1answer
54 views

how to isolate the application layer? [on hold]

I am trying to build a chess game with c++,but I don't know how to design the software. I know that we should program to an interface,so the application should be a set of interfaces (ex: GUI,Input/...
1
vote
3answers
65 views

Class methods that are never called and everything handled by the internals of the class itself

I have a class in my code and I'm not sure if the design I've implemented is correct or if there is a better way to do it. The class I have created have important useful methods that is used by each ...
0
votes
2answers
69 views

Instantiate a class with two parents

Suppose I have TypeA and TypeB classes, which are totally different, but both hold an list of TypeC objects. Class TypeA { List<TypeC> cs; } Class TypeB { List<TypeC> cs; } Throuth all ...
1
vote
0answers
16 views

Multiple apk's on Play Store for multiple feature testing

We have different teams working on multiple features. The feature release dates for each team are simultaneous. I want to create a mechanism so that each team is able to push an APK to the Play Store ...
1
vote
2answers
51 views

Building a plugins-based code in Python

I have a program which perform different actions depending on the plugins that are passed. For example, python main.py -m foo -m bar will perform the actions of foo and bar. The structure of the ...
-5
votes
0answers
55 views

Should businesses invest money in documenting product knowledge and system architecture? [closed]

When product or system documentation is poor, is this typically a conscious business choice by companies? Is documentation usually not as valuable to organizations as hiring more developers to ...
1
vote
0answers
37 views

Functionality design: Multiple sources, multiple consumers with configuration

It is a Design Problem which I am listing out here. I have multiple event sources in my app, each one produces events with the different set of data (but each source is producing only one type of ...
-1
votes
0answers
46 views

Token-based registration

I'm trying to create a system where only users with a valid token can register. You may think of the token as a String which allows the user to register in my system. The token should cover: Status: ...
0
votes
1answer
28 views

Processing data in a cluster with multiple tasks

The goal is to provide a scaleable system implementing multiple data processing tasks which can be seen as a graph. Data objects will travel that graph. Most object will visit the same nodes in the ...
-3
votes
1answer
74 views

When designing a web application with Vue.js and ASP.NET Core, is ASP.NET solely for the API?

When creating a web application from scratch with ASP.NET MVC Core (using Visual Studio 2017) and using Vue.js, is the MVC Core part of the application solely for the API? What other function would ...
2
votes
3answers
77 views

Is a setter with the composed object as a parameter better or separate setters for each parameter within the composed object?

I have two ideas on how to proceed with an availability class but I'm not sure which one is better. public class TimeRange { private Timestamp startTime; private Timestamp endTime; public TimeRange()...
2
votes
2answers
60 views

How thoroughly should you document business flows for a product or system you are learning?

I work on applications that have user documentation but it is not organized or updated to the current release. Is it worth my time to create my own documentation with screenshots and notes on all the ...
0
votes
1answer
29 views

(Fuzzy) Data duplication detection - scoring systems strategy

Many systems that store data in a structured manner (although this is marked language agnostic, the origin of this question is an MS SQL database) struggle with duplicates. Taking a physical person/...
2
votes
2answers
77 views

Combining composite, decorator and visitor patterns

I am currently working on a project where I need to manipulate a tree-like data structure, which I implemented with a composite pattern. I want to be able to do different actions on this data ...
5
votes
4answers
193 views

Improved design for a turn-based multiplayer game using AI?

I'm trying to decide which is the best architecture for a turn-based multiplayer game where the players can be either humans or AI and the UI is optional, for instance because the game can just be ...
0
votes
1answer
59 views

Too strong of coupling between aggregate roots?

In an effort to save this question, I have re-written it. The original question was regarding how to associate aggregate roots. I have re-factored the code slightly but believe this may couple the ...
0
votes
1answer
49 views

Is it better to initialize semaphores in shared memory or give them as command line arguments? (C++)

I am on a project for which I have to spawn many different processes, all in different executables, and there will be some shared memory segments and some semaphores to synchronize them. I use an "...
-1
votes
1answer
78 views

Would I need a web framework if the app is running locally and not in the net?

I need to make an Employee Payroll application and the client specifically stated that the application will run on their computer locally and will not be hosted anywhere in the internet. I can code ...
0
votes
0answers
9 views

Running a local instance of ElasticSearch on a REST API - is this feasible?

So, I'm looking at elastic search api, and the way you interact with it is, you excecute the ES binaries and make http requests on localhost (to insert, delete, whatever). Eg: curl -XPOST https://...
2
votes
3answers
273 views

How correct this little game design without removing its design pattern?

Given is a design of a video game in which a player has several possibilities to adjust his character: Game designers realized it's senseless to be a fire-elemental and water-elemental at the same ...
2
votes
1answer
70 views

Is it common for seemingly small feature additions to involve changing many functions?

I wrote a binary calculator & binary teaching program in the Rust programming language. I was taking an iterative approach in that I decided to first get a basic "learn binary" game started. This ...
1
vote
1answer
54 views

How to restore to the correct state when the running process may get shut down thus missing some events?

Here are the requirements: (not the real case, just very simplied version) There is some sort of promotion which lasts for a week. The selected users who may benefit from the promotion is fixed at ...
1
vote
1answer
101 views

Are formal Product Specifications still relevant? [closed]

I had a conversation with a recruiter recently. As a contract engineer, I've worked several jobs over the years and it's been ages since I saw a formal specification. Confluence pages, yes. Jira ...
0
votes
1answer
60 views

Making execution of Python script fool-proof beyond adding shebang

Assume that a Python package (available via PyPI) is too difficult for novice users to utilize. Specifically, typing python2 path_to_package/start_GUI.py in the command line, which opens a TKinter GUI,...
1
vote
1answer
74 views

“State” pattern and encapsulation

Suppose we have the following classes: As you see, it's an implementation of the State Pattern. Basically, the Order class proxies the pay() and cancel() method calls to it's concrete OrderState ...
1
vote
1answer
122 views

Java Class Design

I need to send a json response. I use the jackson library to convert the class to json. I have a core java class to which I need to add some more fields to create my json response. I came with two ...
0
votes
1answer
24 views

CQRS across bounded contexts to generate reports with possible business logic

Where do you draw the line for how much logic can go in your read models? For example, we have 2 BCs: Inventory and Sales. We need to generate reports regarding inventory levels on specific dates: ...
-1
votes
0answers
120 views

Is it a code smell to expose a public method just for testing purposes? [duplicate]

Is it a code smell if the consumers of a class do not need a particular public method of the said class, but having the method simplifies its testing significantly? Consider the following example: ...
131
votes
17answers
12k views

How do I know how reusable my methods should be? [closed]

I am minding my own business at home and my wife comes to me and says Honey.. Can you print all the Day Light Savings around the world for 2018 in the console? I need to check something. And I am ...
2
votes
2answers
85 views

A good way to represent an object with multiple interconnected states?

I want to program a simple budget application. In my application, the budget is divided into budget periods (months by default, but it can be bi-weekly or weekly periods). In each period there is a ...
0
votes
1answer
52 views

Firmware Design Document (FDD) for an embedded system

What is a firmware design document (FDD) in terms of an embedded system? I am working on developing an application that would be working on a customised board similar to the Xilinx Zynq Development ...
0
votes
1answer
84 views

In MVC + SOA Architecture, What is the Rationale for Placing Business Logic in Models?

When writing web applications I place business logic in controllers. This has worked well for my small App Dev team- our applications run reliably, perform well, and the code is easy to maintain. ...
8
votes
2answers
149 views

fall-through switch for executing a sequence of steps

My program needs to execute a sequence of steps from start to end. But based on different input the start point will vary, e.g, some will run from the first step to end, some will run from the 2nd ...
-2
votes
3answers
164 views

Choosing between the lesser of two evils — bad design?

I have two classes, Bar and Baz. Both subclass the abstract class Foo which has a method doThing(). Bar implements a functional interface Now which contains method doThingNow() whereas Baz implements ...
1
vote
3answers
113 views

subclass with no logic of abstract class

I have a class named Change which should be abstract and have some basic methods. I have classes Insert, Update and Delete that extends Change. In the case of Insert, Update I just use extend and add ...
-3
votes
3answers
140 views

Is storing configurations in memory more performance and maintenance efficient? [closed]

My teammate has this class which contains a lot of Strings: public class Config { /** * List of status */ public static final String IN = "bla*"; public static final String ...
-3
votes
0answers
70 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
21 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 ...
1
vote
1answer
70 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 ...
2
votes
5answers
189 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 ...
-2
votes
0answers
35 views

What Is A Redux-Glorified-Setter?

I see this phrase as an alternative name for badly designed action creators because they have a lot of dispatching. On the other hand, isn't it the purpose of action creators? to centralize ...
3
votes
3answers
131 views

Factory pattern or builder pattern ? which one is suited for reading Finite Element Model data from a text file?

A follow up to another question (Making a design decision about reading model data from an input file). I wish to ask another question regarding builder or factory pattern. (I read that builder is ...
2
votes
1answer
83 views

Making a design decision about reading model data from an input file

I am writing a finite element software in C++ and Qt. I want to load the input data to the model. I have a Model class that holds the data and does the work. I have created a simple lexer and parser ...
2
votes
1answer
157 views

What are the pros and cons of keeping most of an application's state in a single struct?

In my application, I have a few classes. Many of these classes share common state like a reference to the logger for example. For example, both A and B require some common state to get their job done. ...
-1
votes
1answer
76 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-...
2
votes
2answers
85 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 ...