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

learn more… | top users | synonyms (1)

-2
votes
0answers
20 views

Where to learn how to write Linux services [on hold]

(I hope that I am asking an appropriate question) I have recently written a program that manages files, and would be best run as a service. The code works well, but I have no idea as to how to go ...
0
votes
0answers
20 views

Is a promise-aware eventing system desirable?

I'm fully aware that Promises and eventing are both ways to do asynchronous programming, and you can choose either one for a given project. However, in practice, the code base I'm working with is ...
0
votes
1answer
76 views

Why do I need dependency injection and the depencency inversion principal in my case?

I'm a student of best practices, architectural patterns, and design principals. I have been studying dependency injection and inversion of control a lot lately, and have been "drinking the koolade" ...
0
votes
2answers
62 views

User Interface design for selecting elements from big lists

I am not to sure if this is a question which fits the topics of software engineering. I have two levels of objects "Categories" and "Category Values". I need to build a user interface for users to ...
1
vote
0answers
120 views

Design elevator system algorithm and classes? [on hold]

Here are the main classes I can think off the top of my head. All business objects will follow the abstraction (implement interfaces). I have not mentioned interface names to avoid verbosity. I have ...
1
vote
0answers
118 views

How to reduce “mapping” code?

I have two components, both are a parser/builder pair. So component A can parse A and build A, component B can parse B and build B. A and B both contain different entities, which are extracted by the ...
0
votes
1answer
48 views

How to save User Information for an external site? [on hold]

I have an app which is mainly an gateway for an external site. With my app you can administrate multiple pages and see if there were changes on it (e.g. forum-communities). The point is that these ...
2
votes
0answers
79 views

Design Pattern for Internal Builder

There is an object which is very complicated to build and many algorithms needed to figure out how it should be created (for your curiosity it is an object that represents and draws the beaming of ...
1
vote
0answers
78 views

Design: Mixing-in different functionality into class hierarchy in C++

Assume I have a sort of Observer-Pattern, where message objects are sent to observers. So I have say class Message as the top of a hierarchy and observers working on them. Concrete messages are ...
0
votes
1answer
99 views

Why does ncurses use Color Pairs?

On your favorite terminal, the special ANSI character for red text is ^[[31m. The special ANSI character for a blue background is ^[[44m. So, to have red text on a blue background would be ^[[31m^[[...
3
votes
1answer
94 views

One huge ViewModel or (ab)use database for each view

I'm in the process of designing an application structure and am currently thinking how to structure my asp.net MVC5 front-end. My application is wizard-like with tabs for each step. It's not a strict ...
7
votes
1answer
190 views

Am I trying to decouple classes too much here?

I am working on a real-time terrain rendering engine. I have a QuadTree and Node classes. The QuadTree class expands/collapses a tree depending on where the camera is. So it makes sense that the ...
-2
votes
1answer
119 views

Is OpenGL just badly designed?

I have been using OpenGL and OpenGL ES for a long time, and I know them pretty well. They're also really, really annoying to use, and I haven't really seen this discussed anywhere. Here are some ...
0
votes
1answer
44 views

Aligning text columns of different size and content

In a past posting, I asked about commands in Bash to align text columns against one another by row. It has become clear to me that the desired task (i.e., aligning text columns of different size and ...
-5
votes
0answers
46 views

Good design and coding practices for software processing big data [closed]

I would like to know if you could share your opinion about good/best practices about designing and coding (eventually in GO) softwares devoted to process a large amount of data. I have tried looking ...
5
votes
4answers
457 views

Does it violate any OOP principle if a member function does not use any of class properties/member variables?

I have an existing class which interacts which can open, read or write to a file. I need to retrieve a file modification for that purpose I have to add a new method Suppose this following is my ...
2
votes
1answer
69 views

Is avoiding having the fields representing the same object in different communicating classes reasonable?

I'm developing a program which does communication to different types of devices (with respective protocols). It should concurrently acquire messages from devices and write them to a file with specific ...
0
votes
1answer
87 views

What architecture/guidelines should be considered to write reusable module of project?

Introduction I am working on MyProject which is windows (desktop) application being developed in C#.NET and DotNet Framework 4 in WPF. Project is layered as DataAccessLayer (DAL) --> ...
4
votes
0answers
166 views
+50

MVVM best practices with WPF client and WCF duplex service

I've been thinking about how to design my WPF application, which receives data from a WCF duplex service, but I'm afraid of over engineering. I thought about abstracting away the WCF communication ...
2
votes
1answer
97 views

Possible ways of implementing an HTTP proxy with priority mechanism

I'm working on a TCP HTTP proxy: need to turn it in a priority proxy. The standard proxy used to deal every connection with a fork and the child process handles the connection. Now I've implemented a ...
1
vote
1answer
74 views

Override method with subclass as argument

When you want an overrided method to take as argument a subclass of the argument of the overridden method, you usualy accomplish that with generics (as discussed in Template pattern with varying input ...
0
votes
1answer
33 views

What does the environment means in Ishikawa (fishbone) diagram

I'm not sure I'm asking this question on the right forum but I am designing an Information System for the French Social security system. I've been asked to use an Ishikawa (fishbone) diagram to ...
2
votes
1answer
54 views

Architecting Service, Manager and Model classes for concurrency in a web application

Let's say that I have a chatroom application that manages rooms, users, and messages. I'm building this out as an opportunity to practice some service/manager/web separation and teach myself good ...
15
votes
5answers
1k views

Aren't “deep composition hierarchies” bad too?

Apologies if "Composition Hierarchy" isn't a thing, but I'll explain what I mean by it in the question. There isn't any OO programmer who hasn't come across a variation of "Keep inheritance ...
1
vote
1answer
45 views

Design for iOS app backed by API

I was wondering if anyone out there has general tips for how to structure an iOS app backed by a REST api. There are basically two approaches to this that I've thought of API calls placed ad hoc in ...
0
votes
6answers
251 views

Does dependency injection belong in constructors, setters or other methods?

I can write code like: var dependency = "Hello!" var something = new Something(dependency); something.DoStuffWithDependency(); Or I could write it like: var dependency = "Hello!" var something = ...
0
votes
2answers
99 views

Repository Pattern with Multiple ORM

We are developing the application with MVC and Repository Pattern. Currently we are using EF as an ORM. But Later we need to change the ORM to nHibernate. Any Idea on the architecture. Currently I ...
1
vote
2answers
67 views

Java application - How to optimize database calls and space & time which is more important?

I am writing a simple Java app to run weekly. The app need call database to get data, check it and update. The flow I need is little as following: select configure,orgID where status=true from orgs; ...
1
vote
3answers
168 views

Handling diverse “plugins” while staying sane

My colleagues and I are struggling with a design problem. I'll try and explain the situation: We have a number of different components (let's call them plugins), that take an input, do something ...
-3
votes
2answers
132 views

Reprogramming a commercial bluetooth headset

I am prototyping a bluetooth headset. Wondering whether it is possible to buy an existing bluetooth headset, connect it to a computer and reprogram it (i.e. change the behaviour of the buttons etc.). ...
9
votes
4answers
1k views

When to ignore errors that are common and the program recovers from [closed]

I have a program that makes hundreds of daily CURL requests, SMTP request, and other requests. Less than 1 percent of the time, a CURL or SMTP request will fail. Best I can tell, the cause of the ...
20
votes
7answers
5k views

Should “Set” have a Get method?

Let's have this C# class (it would be almost the same in Java) public class MyClass { public string A {get; set;} public string B {get; set;} public override bool Equals(object obj) { ...
4
votes
2answers
201 views

How to parameterize Commands without the caller “knowing” anything about the Command ahead of time

My question is similar to (but not exactly the same as) this question. This question was also helpful but it is less similar to my current question than the previous question that I linked to. I have ...
-1
votes
1answer
121 views

How to force user to create new instance of object

I have library with asynchronous thread and application who use them. Application can pass object to library of type provide by library interface. If application does not create new instance of object ...
1
vote
2answers
119 views

Creating abstraction over API

I'm trying to figure out how to create abstraction over different APIs, which have common things. For example let's take the mobile platforms you have Android, Windows Phone and IOS. Let's say I want ...
4
votes
1answer
51 views

How to Implement Service Discovery for External Docker Swarm Clients

I have a question regarding a specific case with our product. Let's say I have two services; Service A and Service B. (The number of services varies from an installation to installation). They are ...
1
vote
1answer
82 views

Design a java based menu so that it's easier to add new options

I am trying to create a java console program which displays a Menu with few options. Each option selection performs some independent operation say executing a script or performing some db operation, ...
-1
votes
3answers
76 views

Software Design in Software Projects [closed]

Typically in a software project, which individual is responsible in creating the UML Diagrams. I.E. Sequence , Component, Use Case Diagrams. Is it the System Analyst?
3
votes
2answers
80 views

Should we include external services in a deployment diagram

I am designing a Deployment diagram and a Component diagram for an existing Java EE application. The app has integration with 3 external systems through soap web services and ftp. I am including ...
0
votes
3answers
122 views

A-B-C relation vs A-B, B-C, A-C relations

I't s a Database related Entity Relationship (ER) doubt: Better to have a single table storing A,B,C as a unique identifier or a Relationship. O better to split it up to three tables having then A,B - ...
0
votes
2answers
131 views

What programming techniques are there to find the combination of inputs that produces the best result? [closed]

I am working with a big set of data right now and I wrote a program that calculates a result based on some inputs. I have 10 inputs, each of them has about 20 different possible values. I am not sure ...
4
votes
4answers
228 views

Evolving an interface that is not supposed to be implemented by the client

I'm about to write a Java library. Basically, this library provides something like this to its user: interface Foo { void doA(); boolean aWorked(); void doB(int value); } The user is not ...
0
votes
0answers
86 views

What is the fastest way of using conditional in Javascript when comparing multiple strings?

I have a piece of code that looks something like this var abc = function(pathin, pathout) { if(pathout === "bcd/fgh" && pathin === "egh/abcd/gh") {....} else ...
1
vote
1answer
67 views

How to use object oriented principles to design a system that trims, selects, and formats values based on business rules, and unit measuring system?

TL;DR: I have bad, no .. horrible, horrendous code that kind of works but is a mess and is not easily maintainable. I want to redesign it and repackage it to where objects are well defined and ...
0
votes
1answer
61 views

Find best subcombination from given combination

Each component has multiple possible states and any number of them can be active at a time. Some combinations of states have a value associated with it. At any given point, it wants to be able to get ...
4
votes
2answers
251 views

Can helper-methods be overused?

In the spirit of divide and conquer, I've gotten into the habit of using helper methods almost everywhere, including for the simplest of tasks. As a really simple example, let's say I have a sort of ...
0
votes
1answer
139 views

Is it OK to use class names in an interface definition?

I am creating interface in Java for custom error handler. Want to pass an argument error object but I need it to be child of Exception class. Is it okay to use my defined class name in an interface ?...
3
votes
2answers
91 views

Interface declaration - latest vs historical

Imagine there is an interface IPriceProvider which supposed to serve 2 needs: historical and latest. So I think we have 2 options here. First: PriceInfo GetLatestPrice(string symbol); PriceInfo ...
0
votes
2answers
123 views

How to handle fast data generation vs slow data storage efficiently

I'm working on a project that generates massive amount of data and store that data in a SQL database. I'm talking about like 1 thousand records per second. Next I've to push that data to a database. ...
6
votes
3answers
160 views

Poor-man's option type vs sentinel value in C

I'm debating the merits (bikeshedding?) of two different approaches to a simple problem. This setting is numeric, but may not exist, so the options are: Does not exist 0 1 2 3 The programming ...