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

learn more… | top users | synonyms (1)

0
votes
1answer
64 views

How should I design a wizard for generating requirements and documentation

I'm currently working in an industry where extensive documentation is required, but the apps I'm writing are all pretty much cookie cutter at a high level. What I'd like to do is build an app that ...
3
votes
2answers
216 views

How do programmers handle several versions of a same program? [closed]

A lot of apps, for instance, have a free version and pro version. Do programmers, when a new update is released, remove lines of code that shouldn't be available in the free version? As for Visual ...
1
vote
4answers
140 views

When should a method of a class return the same instance after modifying itself?

I have a class that has three methods A(), B() and C(). Those methods modify the own instance. While the methods have to return an instance when the instance is a separate copy (just as Clone()), I ...
5
votes
6answers
503 views

Requesting feedback on my OO design

I'm working on an application that creates music by itself. I'm seeking feedback for my OO design so far. This question will focus on one part of the program. The application produces Tune objects, ...
3
votes
1answer
158 views

What is the right way to process inconsistent data files?

I'm working at a company that uses Excel files to store product data, specifically, test results from products before they are shipped out. There are a few thousand spreadsheets with anywhere from ...
1
vote
0answers
104 views

JS closures - Passing a function to a child, how should the shared object be accessed

I have a design and am wondering what the appropriate way to access variables is. I'll demonstrate with this example since I can't seem to describe it better than the title. Term is an object ...
1
vote
1answer
129 views

Changelog Management [closed]

I'm currently developing a WinForm application. In order to inform the client about the improvements and corrections made during the last version, I would like to manage and display a changelog. I ...
0
votes
2answers
105 views

How would you create a program where two objects randomly move throughout the screen BUT never collide? [closed]

they are free to move anywhere on the screen weather in straight lines or curved ones just as long as they don't be at the same place at any given time. btw I'm not asking how to write it in code, ...
1
vote
2answers
128 views

Where should the “not empty field” validation code be written on a 3-layer application?

When working with the 3-layer model, where should the validation code be placed? for: not empty fields, unchecked options, null values, wrong-written dates, etc. To keep total isolation between a ...
4
votes
2answers
367 views

How to layer if statements when order of logic is irrelevant?

Basically I have a series of logic in my website that can lead to 5 total outcomes. Basically two different if tests and then a catch all else statement. For example: if cond1: if mod1: ...
1
vote
0answers
63 views

Dealing with class optional dependencies

I am wondering how are you guys handling an optional class properties. Let's say I have a product that can bud doesn't have to have a color property. Is that really the best way of doing that? Should ...
0
votes
2answers
259 views

How often do you refactor or restructure your code in long term projects? [duplicate]

As developers we are always eager to learn new things and better ourselves at what we do. You've all had moments when you look at your old code and get that feeling: "WTH, I can't believe I used ...
0
votes
1answer
132 views

How to generalize a classes that has identical function plus some additional function

I have some designing problems with my project. To illustrate my problem, I'll use the following two classes from my project. public class RAM_UserManagement{ private Map<int,User> userList; ...
1
vote
2answers
321 views

How to approach program design with respect to data strucutres and algorimths - is there an equivelant of the OO design process for d.s.'s + algs? [closed]

My applogies for probably the worst written body of text I have produced in my life and many thanks to those willing to plough through it all. I was (and still am) not able to clearly express what I ...
0
votes
2answers
105 views

Which layer should service errors be handled in?

I am coding in a multitier architecture in Java, and I perform a query to a web service. Is it better form for the errors returned by the service be handled in the data access layer or in the ...
1
vote
1answer
78 views

Doesn't an event bus affect global state?

"Minimize mutable global state" is a more or less accepted program design principle. The reason often cited is that having global state can affect two components that don't are seemingly unrelated. In ...
2
votes
2answers
73 views

What is the point of writing WCF Interceptors, compared to using a helper method?

For those of you who don't know, WCF allows you to attach interceptors to methods in the service contract. The interceptor is capable of performing custom logic before and after a method call, and is ...
2
votes
1answer
164 views

How to store satellite data in C data structutres

I've been reading through Introduction To Algorithms 3rd Ed, and am really enjoying the material; however, I am having difficulty in implementing some practical situations. It's not the theory, or ...
0
votes
1answer
57 views

Pattern or idea to communicate with async hardware

This is more like a theory question than a practical one. And although I am using Arduino and Labview, it should work independently of the platform. I have an Arduino board controlling a set of pumps ...
1
vote
1answer
271 views

Should ORM data access methods be wrapped or used directly?

We're using an internally-built ORM. Each table is represented by a Model class, which inherits from a base model class that has a handful of methods like GetAll, GetWhere (to get rows with specified ...
0
votes
2answers
131 views

How to route messages between clients using a central server in Python

I've got three Raspberry Pis sitting around. I want 2 of them to be able to chat while the 3rd routes the messages (acts as a server between them). The general flow of events should be something like ...
0
votes
3answers
127 views

Assigning responsibility for cancelling an Order

During a conversation with our Domain Expert we can across this feature: A Customer service agent can cancel an Order by decreasing its quantity. To cancel an Order we decrease its quantity by the ...
1
vote
2answers
72 views

Creating fast, realtime dialogue search for television scripts

We have a database of television scripts and we'd like to search it, getting results as we type. We often remember words or snippets of dialogue but can't remember exactly what was said or what ...
2
votes
1answer
307 views

Things developers do before the coding phase [closed]

I'm a new software developer, and in my internship my boss asked me to develop an application that allows him to manage his inventory. Something small but, for me, very enriching. The application is ...
1
vote
1answer
75 views

Data generation system modular design

I am trying to think of the most sensible way to design the architecture of a data generation system with several steps. Data in the system goes through several transformations which can be divided ...
4
votes
1answer
155 views

Implementing a Username Class

I am attempting to encapsulate several features about a user in a single class. Although the main use for this class would be to initialize it once and never have to call set any variables again, I ...
0
votes
3answers
319 views

How do you make a service stateless?

When doing Domain Driven Design it is advised that services should be stateless. There are several kinds of services when doing DDD: Application services. Domain services. Infrastructure services. ...
1
vote
5answers
189 views

Choosing a class abstraction when multiple viable approaches exist

I'm having trouble trying to design a class structure for some search functionality. It's quite possible that I'm approaching this incorrectly altogether, but putting that aside I'm curious how other ...
3
votes
2answers
227 views

What is the reasoning behind these design choices? [closed]

In ReactJS tutorial you are guided in the building of a commenting system. It's a very useful tutorial to understand ReactJS library, but there are some design choices I can't fully understand. So ...
4
votes
2answers
107 views

How would you approach errors notification?

Recently we had a discussion with my colleagues caused by my intentional attempt to generate user friendly message about occurred error (business logic) at the server side. They insisted on putting ...
2
votes
3answers
261 views

Uses for System.gc() in Java [closed]

In Java, there is a method called System.gc(), which calls the garbage collector (or rather, "suggests" to the JVM to run the GC). Are there valid reasons to call this method? I'm thinking that it ...
0
votes
3answers
77 views

Structuring an application that reads from a .properties file

I have a Java app with three classes: Foo, Bar and Baz. All three depend on a bunch of what are currently constants defined in each class in order to determine how to run. On top of that, Baz ...
2
votes
4answers
1k views

Why would the switch from C# to scala make sense in order to take advantage of scala's functional capabilities? [closed]

What is the benefit of using functional program for large scale software projects? I have heard it is pretty performance equivalent to regular OOP. I also have heard that it is more "mathematically ...
2
votes
3answers
93 views

How to maintain view-related information in MVVM and may I store this in the model?

I have an ongoing discussion with some colleagues on how to manage the views to our model. We've got a model which may be represented by many views. Let's say we've got some data that is stored in an ...
0
votes
1answer
150 views

Does lots of Instance Variables within my class suggest flawed Design?

Ok so I am setting out to consolidate some learning I have been doing. What I am going to do is create a small game relating to a game I enjoy called Persona. For reference a persona you can think of ...
3
votes
2answers
340 views

Programming by usage

Iv'e been programming for 15 years now and I often read online that it seems like a lot of people will plan out their objects and how they interact and the data they need and that seems to shape the ...
2
votes
1answer
398 views

Is object oriented programming ALWAYS a good way for large projects?

Is object oriented programming always the good way for all types of projects? Is this methodology the best suited for large projects like compilers, interpreters and other large systems? Most of the ...
7
votes
4answers
478 views

“Immutable” interfaces

I am confused about the notion of immutability. Consider the following structure of a simplistic calculator: Here are the interfaces: interface IOperationalInterface { int Sum(int a, int b); } ...
0
votes
1answer
83 views

I recently read about unit of work and repository design patterns; working with EF wondering if this is a good design pattern

I found myself creating child records that require a master record to exist, first, so that they can reference it by the master record's primary key (if that's the right term). To accomplish this ...
2
votes
3answers
220 views

Phone Number based Login

I'm trying to implement a phone number based login and not sure if I should ask the users for full number, i.e country code + number or just the number. What I have in mind so far: Attempt ...
2
votes
3answers
257 views

Implementation strategies for atomic counter

I basically have a counter variable that is decremented and frequently polled. There are three options to implement that, that I can think of: Number 1: private volatile int count; public void ...
1
vote
2answers
120 views

What is the best practice for designing a system supporting many languages, 1 central dictionary for all languages or seperated dictionary?

I want to build a system which uses dictionary of many different language. There are 2 options: Build 1 central dictionary Table & each language is identified by langType (ex 1 for German & 0 ...
1
vote
2answers
174 views

API - How to handle scope based functionality?

TLDR; Where and possibly how should I implement scope based logic in the example code? I have got a ASP.NET Web Api. The Api uses OData (on top off REST) for data endpoints and OAuth 2.0 ...
0
votes
3answers
127 views

How should I approach storing single boolean results for a whole table?

I previously asked this question on stack overflow. But have not received any responses that might help me. So I thought I would try here. ...
1
vote
1answer
112 views

Domain-specific Interfaces

Are there any real benefits of using interfaces over abstract classes in a domain model? Does anyone have any experience using interfaces in a domain model in a real project? From a technical ...
1
vote
0answers
66 views

Pattern for data types that are related yet fundamentally different in utility

Background I'm currently working on a codebase for what is to become a forthcoming website's content "engine", where it will take in different types of standardized data (implemented with XML), parse ...
0
votes
1answer
107 views

In a REST service project, where should we put code that calls a third party REST API?

My project is organized in layers like Configuration Controller Service Repository Domain Our REST Controller is in the Controller layer. We need to connect to another API via REST calls and I'm ...
3
votes
4answers
206 views

How much data should exceptions hold?

Almost all the exceptions I have ever written have been very lightweight, containing a String message and optionally a throwable. In some situations I have included some application specific enum or ...
1
vote
3answers
319 views

Passing data between hundreds of objects in java [closed]

Currently, I'm working with a group on building a model. This model simulates interactions between many "agents" in a region. Agents can be any entity such as a city, a farmer, a business etc. Each ...
0
votes
2answers
284 views

Preventing ip resolvers in a skype-like program

I'm currently in the process of creating a Skype-like program, that uses a hybrid peer to peer system to communicate between users (i.e. server contains all users IPs, a client that wants to connect ...