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

learn more… | top users | synonyms (1)

0
votes
3answers
131 views

Should a complex unifying class be doing computation?

I have a large application in Java filled with independent classes which are unified in a PlayerCharacter class. The class is intended to hold a character's data for a game called the Burning Wheel, ...
2
votes
3answers
617 views

Is it completely impossible to have total separation without leakage of any kind in a design? [closed]

For the past week I have been attempting to write a proof-of-concept project using dependency injection, a service layer, unit of work pattern + repository. I am looking to design something that can ...
5
votes
6answers
289 views

Passing an object between different handlers or a Superclass that contains most of the logic

I'm going to try to make this as concise and concrete as possible, but apologies since I can think of multiple ways to make it work. This question might also relate to handling production workflows ...
1
vote
1answer
109 views

Production or Custom Test Data for Unit Testing?

I've recently had a little disagreement with fellow developers. We're transforming various ontologies from the original source format (Pica+, RDF, etc) into our data format and have several converters ...
2
votes
1answer
195 views

design strategy pattern with null checking

When the context class can accept a null strategy, is there another way to do it without check if its null? Is this considered a good strategy design implementation? class MainApp{ static void ...
-1
votes
1answer
128 views

Writing data driven reflection based tests to ensure design completeness [closed]

When writing software I'm often forced to at some point to make a decision that involves a design pattern of "by convention" naming and behavioral patterns. This normally makes me feel kind of slimy ...
3
votes
2answers
349 views

Single Responsibility principle VS KISS principle

Let's assume the modeling of User model in a context of a social network. User concept is composed of two notions: Authentication elements like userName/Password/Email etc... Extra data information ...
9
votes
1answer
4k views

Designing an scalable message queue architecture

I have recently started learning the nuances of scalable and enterprise computer architecture, and one of the central components is a messaging queue. In order to learn the most I can from any ...
2
votes
1answer
196 views

Enterprise application with lots of SQL queries

Context: I'm working on a fairly large Access database (which I inherited) that has its interface and tables separated. In order to make this work together, we have a lot of SQL queries (dozens). ...
5
votes
0answers
261 views

Object Constraint Language (OCL) for Stack in java.util package

I have an exam coming up and I'm looking at past papers to get some ideas of what to expect. I'm a bit stuck on the following one and would really appreciate if someone could give some example ...
0
votes
2answers
131 views

Interaction between programs

I am writing an interactive program in which it takes speech input from the user for a specific list of commands. The list of commands will be stored locally in a graph and based on the usage their ...
0
votes
1answer
76 views

Defining a status between last check and now

I have sets of probing data from an internal monitoring tool which represent the availability of different services (databases, webservices and so on). Now my task is to visualize this data and I ...
0
votes
3answers
882 views

Best way to auto login in web application

This question could be titled "Place password hash and salt in query string?" as well to be less subjective, but the point remains the same: I want to create kind of a launcher application for my web ...
3
votes
2answers
203 views

subclass of immutable object not immutable, can this work?

So I'm finishing up refactoring some code to remove a number of previously-mutable objects and add a better generic processing for all the classes in the domain. Just as I thought I was finishing I ...
3
votes
2answers
465 views

DDD - Domain Object calling a web service

Is it ok to call a webservice from a Domain object?. As I write the question I am thinking that you should never do that, as it is poor design, but the situation is the following: I have a domain ...
1
vote
2answers
462 views

Statistics collection engine for C++ systems

We have a research project with idea->prototype->statistics development cycle. Anyway, our final product is a prototype, so the statistics collection suite is not used persistently. Supposing I have ...
10
votes
8answers
4k views

Data structure for accessing units of measure

TL;DR - I'm trying to design an optimal data structure to define units within a unit of measure. A Unit of measure is essentially a value (or quantity) associated with a unit. SI Units have seven ...
2
votes
1answer
2k views

How to implement a Theme for View Controllers in an iOS app?

I have an application, where font size, font type, color, background color, image and a lot of things change based on theme. I realised in the beginning itself that using enums to denote themes and ...
2
votes
2answers
202 views

is it wrong for my parent object to make assumption about child objects?

I have a simple domain with about 6 objects in the model. For the most part they have a clear child/parent relationship with parent having multuple children. I'm going to have all of them be ...
0
votes
1answer
780 views

Abstract methods being used as static methods in java?

In an attempt to write some generic code I find myself putting, in my abstract class, a method that returns some static information about how the class should be treated. This method doesn't use any ...
1
vote
1answer
1k views

Which design pattern is typically used when designing a WCF data services driven Winforms application?

Please excuse me as I am a bit new to the following technologies and practices. I have been given the task to create a management suite utilizing an MDI GUI. This suite will be the front end to a WCF ...
4
votes
1answer
224 views

Feature boundaries in functional programming

I very much enjoy the functional programming paradigm, but I am still not sure how to go about designing a small/medium project with it. When using OO, I have a set of labelled entities (classes) ...
1
vote
1answer
145 views

What's a good way for a program to process an email mailbox?

Let's have a program that checks an email mailbox and then "processes" the messages contained there. (For this question it doesn't really matter what it actually does with the message). The program ...
8
votes
3answers
805 views

Refactoring an existing abstract class and its parameters

I have an abstract class A which declares an abstract method doStuff. Currently there are many classes that inherit from A and implement doStuff. The class' instances are initialized at run-time ...
4
votes
4answers
129 views

better method to revert state if failure occures during add/delete

So I have a generic framework with a concept of children and parent objects, the objects don't have to be the same type, and I can add or remove any of them. Adding calls add on all the children, and ...
10
votes
6answers
2k views

What is a good analogy to explain how software development is different than building a bridge? [duplicate]

If you had a manager, a couple of levels above you, tell you that building software is like building a bridge, how would you respond to that? If this manager truly believes that we should be able to ...
2
votes
2answers
149 views

Is having my objects so aware of each interconnection a bad thing?

I'm looking to refactor an existing design; to move a bunch of stuff out of a database and into memory where it should be (There are many reasons the DB approch is dangerous as it is now). My first ...
2
votes
1answer
629 views

Is there a factory pattern to prevent multiple instances for same object (instance that is Equal) good design?

I have a number of objects storing state. There are essentially two types of fields. The ones that uniquely define what the object is (what node, what edge etc), and the others that store state ...
4
votes
3answers
2k views

Creating an entity relationship in REST: May I create the parent by posting to a child id?

We are currently designing a REST API to access classical customer data. One of the elements in the API are the assets of an user. The assets are added under a given service. The backend API will ...
-1
votes
3answers
106 views

Best way to create draw with limitation

I'm writing a program to automatically make the draw for a competition. There are four objects: Debate Judge School Team Each Debate has two teams and a judge. Each team participates in three debates. ...
1
vote
2answers
446 views

Approach of delivering “Logging API”

I faced a question in a .NET interview. As a client i need a LoggingAPI. How you go the approach of design and development and delivering Logging API to the client? I don't care about WPF or a ...
4
votes
1answer
589 views

Capturing mobile device system (output) audio

I'm trying to figure out a way to capture the system audio of an Android and/or Windows Phone. The idea is to provide a stream based on the music I'm currently playing on my phone. What I'm not sure ...
3
votes
3answers
574 views

Working alone on a project

So I am working on a small Project at my company, I am a mere trainee engineer (halfway through a Software Engineering degree), where we are developing an intranet - based project management and ...
3
votes
2answers
239 views

Referencing countries via Foreign Key Constraint

To make things simple to explain: I've got two tables: Table1 and Countries. The Countries table contains a nice flag and some information, such as DisplayName, the ISO3166 ALPHA3 code and the phone ...
8
votes
3answers
554 views

Is a try and catch that does not throw an exception more efficient than a conditional?

I came across this example recently: If 999 times out of 1,000 an exception will not be thrown then the exception is only generated once. On the other hand a conditional would have been called ...
3
votes
1answer
506 views

Why do most java classes end with “ers”? [closed]

...Provider ...Searcher ...Resolver ...Builder ...Manager ...Importer ...Descriptor ...Helper ...Indexer Is it a global convention to refer a thing with "..ers" or "..ors". In contrast, a "thing" ...
7
votes
2answers
315 views

What is the preferred method for an application to get settings which should not be stored in version control?

Let's say an application I'm writing requires a password for something but I don't want that password to be saved in version control (so no hard-coding the password). What I've been doing is creating ...
1
vote
0answers
63 views

Checking out and compiling repository. What is the correct approach for starting the compilation process?

I am writing a Bash script that automatically updates a repository containing source code and then compiles it. I have been a bit stuck on the part about how to start the compilation itself, i.e. if I ...
3
votes
3answers
481 views

Simple questions to test understanding of Dependency Inversion Principle

I am preparing a short (1-2 hour) presentation about DIP to several (~5) junior developers (1-3 yr xp) in the office. At the end of the presentation I want to know whether they understood what I was ...
0
votes
4answers
235 views

Create a database for database tables

I'm working on a project where I have to give users the ability to build their own tables, each user can create more than one table. (the type of all data is string). The user can create a table and ...
4
votes
2answers
482 views

Testcase runner for parametrized testcases

Let me explain my situation. I'm planning a kind of test case runner for doing testcases on external devices, which are microcontroller based. Lets consider the devices: Device 1 Device 2 There ...
0
votes
2answers
65 views

Is it 'safe' to expect myClasses to agree not to only call package Scope methods from other Package scope methods?

The questions says it all, but a quick overview of the situation. I'm creating a Model which contains classes (all inherriting myObject) which have a large amount of interconnection. I want the ...
1
vote
1answer
161 views

CSS3 shorthand properties

Working on my own I tought I need to learn that css3 shorthand properties, because - as I know now, it affects website's loading time, so I need to optimize it a little bit. I was thinking - is there ...
2
votes
2answers
333 views

How to keep my Activity code readable and maintainable?

I have written a rather small App with only one activity. From my understanding an activity has to be seen as kind of a view and controller in one class. But even for a little app, with 3 dialogs ...
2
votes
5answers
343 views

Do tools, like Windows Workflow, inhibit development growth? [closed]

I’ve had this gut feeling about Windows Workflow (WW) for a while now. And, until now, I couldn’t think of the right words to say in order to explain it. Since I think I have a good way to verbalize ...
11
votes
3answers
931 views

Dependency Inversion Principle: How to define “high-level policy” and “low-level detail” to other people?

I am trying to explain the dependency inversion principle to my (mostly junior) colleagues. How can we define which one is the "high-level policy" and which one is the "low-level detail" in a ...
0
votes
0answers
331 views

Best approach how to create custom fields - dynamic forms

I'm wondering how can I create functionality of custom fields. Below I described what I want and solution which I consider. Case study: Let’s assume that we have 2 roles: Admin and User. Admin has ...
0
votes
2answers
989 views

Designing application flow

I am creating a web application in java where I need to mock the following flow. When user trigger a certain process (add product to cart), I need to pass through following steps Need to see in ...
0
votes
0answers
73 views

How to properly design REST [duplicate]

I intensively work with REST architecture about last year. And I don't stop a wonder how REST is inflexible or may I can't understand how to properly use it. So I use REST services on my backend and ...
2
votes
3answers
314 views

Implicit optimization versus explicit optimization

To explain what I mean, let me start with an example. Consider a deque that supports O(logn) concatenation with another deque and O(n) addition of n elements at one end. This dequeimplements a ...