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

learn more… | top users | synonyms (1)

0
votes
2answers
198 views

Design Question: Keep 1000 newest items; DB vs. application

I have a Qt application, which sends and receives messages. Messages are stored in a local MongoDB. The application has a message list window, which shows sent, received and all messages (depending ...
5
votes
5answers
2k views

Migration from a complex C++ application to C# a — good idea?

We currently have a complex VC++ software application, which uses a library like ObjectARX to build the dll. I feel there are many features in C# like Collections, Generics, and other libraries which ...
1
vote
1answer
183 views

Component design: getting cohesion right

I currently have a set of components named DataValues, ValueParsers, ValueFormatters and ValueValidators. The first one defines an abstract base class DataValue and contains a whole load of ...
0
votes
1answer
365 views

Generic params table design

We have a generic parameter table whose important attributes are : id number auto increment not null domain varchar (200) not null classification varchar (200) not null param_name varchar (200) not ...
0
votes
2answers
506 views

Recommended Abstraction to transfer data over a nework than byte[] array?

I was curious, why do we prefer byte[] array to transfer data over the network and not anything else? Or if I am missing anything, what are the other ways to transfer the data over a network.
4
votes
3answers
288 views

How can I improve this design so that I don't need to dynamically scan classes at runtime?

I'm in the middle of a redesign on the part of my current project that deals with user permissions and authorization. I have an interface named IUserPermissions that encapsulates this information. ...
4
votes
1answer
2k views

How to design a composite pattern in Python?

The concept I'm programming an interface over pygame as a personal project, to make the creation of games easier for me. So far I managed to design an architecture that behaves like this : Objects ...
1
vote
1answer
64 views

Drawing controls and sub controls unaware of their location in parent

Applications and operating systems have a ton of windows and controls, sub windows and sub controls. I've noticed its common to have sub controls have their coordinate systems reset to start at 0 ...
9
votes
7answers
1k views

Should a surrogate key ever be exposed to a user?

Often in a table that has no natural key, it is still useful for users to be able to have a uniquely generated identifier. If the table has a surrogate primary key (and in such a case you would ...
7
votes
4answers
1k views

Best Practice: Should error messages be handled by the API or by the App?

I am designing an application that interacts with a RESTful API. When returning error messages like Unable to sign up user Should the error message be generated by the app? or by the API? I am ...
0
votes
2answers
220 views

Building a tool to fix compiler errors automagically [closed]

When a program doesn't compile, error messages are sometimes esoteric. Often a simple Google search leading to a site like stack exchange solves the problem. Now why can't we automate this? How ...
13
votes
4answers
597 views

Do these specific tables need surrogate keys?

Background I have this tables +-------------------------+ +------------------------+ |Airport | |Country | |-------------------------| |------------------------| ...
2
votes
1answer
240 views

Software Design Stability , YAGNI and Agile [duplicate]

I've met the criterion of good system desing as its stability relative to requirements change. Small req. changes should raise small changes in design. Yet I have gut feeling that almost for any ...
0
votes
4answers
651 views

substitute for static inheritance

I currently have a number of classes (~20) that all do the same thing (abstractly), namely, generate an instance of a particular class from an xml file. The way that they use the content of the xml ...
1
vote
3answers
329 views

Synchronization in the given Code

I had an interview few weeks back, and I was asked to write a code with Setters and Getters. I had written the following code; // Just an example Class ABC{ private int num; public void ...
9
votes
3answers
1k views

Are there strategies for discovering REST services using HATEOAS?

When building a REST service with the HATEOAS constraint, it's very easy to advertise the existence of resources through linking. You make a GET to the root of my site and I respond with the root ...
2
votes
2answers
467 views

In MVC software, who should load the models?

I'm working in a REST JavaScript client, and I'm trying to follow the MVC pattern, but a very basic question came to my mind: who should make the http request and load the data into the model? My ...
1
vote
1answer
322 views

Implicit or explicit database save actions

I'm writing a web app that requires the usage of drag and drop as well as other jQuery/HTML5 features. There are two options for saving a user's changes to a database Implicit: database save on the ...
0
votes
1answer
470 views

Modeling user in MongoDB

Our team is learning to work with MongoDB. We have to model the user among other things for an OAuth-based application. We know how to model in the relational world, but are unsure about how to do it ...
1
vote
1answer
584 views

Which is faster NSDictionaries or object properties?

If I abandon creating model objects which I only use to pass information and use NSDictionaries instead and have constant for keys in the same place where I am using the model, then does it have any ...
2
votes
2answers
259 views

Notifying a separate application of an event

I have an application that runs through various tasks as an automated process. My client would like me to create a file in a given folder for each task as a way to flag when each task completes. ...
0
votes
2answers
78 views

Working with data and meta data that are separated on different servers

While developing a product, I've come across a situation where my group wants to store meta data for data entry forms (questions, layout, etc) in a different database then the database where the ...
1
vote
1answer
1k views

What is a Non-Functional Requirement? [duplicate]

In my breakdown of work I have to define work against 'Functional' and 'Non-Functional' design elements / work in my applications. I read the description from Wikipedia here: ...
6
votes
4answers
353 views

Are the technologies used in an application part of the architecture, or do they represent implementation/detailed design details?

When designing and writing documentation for a project an architecture needs to be clearly defined: what are the high-level modules of the system, what are their responsibilities, how do they ...
3
votes
1answer
868 views

Why, in WPF, do we set an object to Stretch via its Alignment properties instead of Width/Height?

In WPF's XAML, we can tell an element to fill its container like this: <Button HorizontalAlignment="Stretch" VerticalAlignment="Stretch" /> Why is it that when we set an element to Stretch, ...
5
votes
2answers
3k views

Is context inheritance, as shown by Head First Design Patterns' Duck example, irrelevant to strategy pattern?

In Head First Design Patterns it teaches the strategy pattern by using a Duck example where different subclasses of Duck can be assigned a particular behavior at runtime. From my understanding the ...
7
votes
2answers
12k views

Distinction between API and frontend-backend

I'm trying to write a "standard" business web site. By "standard", I mean this site runs the usual HTML5, CSS and Javascript for the front-end, a back-end (to process stuff), and runs MySQL for the ...
0
votes
1answer
136 views

Share Mulitple Classes as one dll or a lib with Mulitple Projects

Currently I have some shared class files(.cpp and .h) which I include them in around 20 Projects. Currently I have to include them in all of the projects. So if I get some business requirments and I ...
14
votes
6answers
2k views

Loose Coupling in Object Oriented Design

I am trying to learn GRASP and I found this explained (here on page 3) about Low Coupling and I was very surprised when I found this: Consider the method addTrack for an Album class, two possible ...
1
vote
3answers
266 views

Should I force users to update an application?

I'm writing an application for a medium sized company that will be used by about 90% of our employees and our clients. In planning for the future we decided to add functionality that will verify that ...
7
votes
2answers
2k views

Solutions for floating point rounding errors

In building an application that deals with a lot of mathematical calculations, I have encountered the problem that certain numbers cause rounding errors. While I understand that floating point is not ...
2
votes
3answers
750 views

Recommened design pattern to handle multiple compression algorithms for a class hierarchy

For all you OOD experts. What would be the recommended way to model the following scenario? I have a certain class hierarchy similar to the following one: class Base { ... } class Derived1 : ...
2
votes
2answers
202 views

What values in an application should be configurable?

What values in an application should be configurable, or otherwise not hard coded? Does this differ based on application type (batch vs UI) and are there any published standards or guidance on this ...
0
votes
1answer
141 views

Is acoustic fingerprinting too broad for one audio file only?

We were looking for some topics related to audio analysis and found acoustic fingerprinting. As it is, it seems like the most famous application for it is for identification of music. Enter our ...
3
votes
2answers
83 views

How to refactor to cleaner version of maintaing states of the widget

Backstory I inherited a bunch of code that I'd like to refactor. It is a UI application written in javascript. Current state: We have main application which consist of several UI components. And ...
75
votes
16answers
5k views

Should we design programs to randomly kill themselves? [closed]

In a nutshell, should we design death into our programs, processes, and threads at a low level, for the good of the overall system? Failures happen. Processes die. We plan for disaster and ...
2
votes
4answers
515 views

How to convince my teammates that spawning numerous threads is a bad design? [closed]

I've stumbled upon this problem when tried to run our application in bad network conditions; it spawns hundreds of threads (which exist long time before termination), and with time the application ...
0
votes
2answers
172 views

Memento with optional state?

EDIT: As pointed out by Steve Evers and pdr, I am not correctly implementing the Memento pattern, my design is actually State pattern. Menu Program I built a console-based menu program with multiple ...
1
vote
1answer
157 views

Dividing a packet protocol into layers

I work on embedded systems, so frequently, I am required to implement protocols. When I do this I like to make nice clean layers. However, this become difficult where the fields used by different ...
-1
votes
1answer
468 views

Compile and run submissions of online judge in the same or separate server?

I am going to make an online judge platform. I have looked for some online judge platforms on the Internet for reference (I mean the platforms which have the source code available, and can be hosted ...
8
votes
5answers
212 views

Gathering all data in single iteration vs using functions for readable code

Say I have an array of runners with which I need to find the tallest runner, the fastest runner, and the lightest runner. It seems like the most readable solution would be: runners = getRunners(); ...
1
vote
7answers
675 views

Finally block for methods - is it a bad idea?

The finally block for a try-catch structure is well known, and gives a really easy and elegant way to deal with some must-be-done code. Therefore, I can see no reason why It shouldn't be good for ...
0
votes
2answers
131 views

Representation of data in application versus database [closed]

I'm going to make an application that will be given data to put in a database. The data will for the most part be the same, but the way it is formatted will vary a lot (could be in anything from text ...
7
votes
2answers
248 views

Does responsive web design go against the Separations Of Concerns principle?

I'm wondering how responsive design plays along with the Separations of Concern principle, in respect of how we're allowing a single implementation behave for multiple presentation devices (mobile, ...
1
vote
1answer
176 views

How do I create a mutually-incompatible type library in Java?

Folks, this seems like it should be straightforward, but I'm drawing a blank here. As a simplified example, consider an abstract class called Number with an abstract method add(). I want to create ...
1
vote
1answer
470 views

Interfaces, Adapters, exposing business objects via WCF design

I know there have been countless discussions about this but I think this question is slightly different and may perhaps prompt a heated discussion (lets keep it friendly). The scene: I am developing ...
0
votes
2answers
941 views

Ways for a young programmer to not feel intimidated at my first REAL programming job? [duplicate]

I'd like to state first that I'm a 19 year old programmer living in Portugal, and have recently started my first REAL programming job. I say "REAL" because at my previous jobs, I was normally the ...
1
vote
0answers
214 views

Development of algorithmical concept for scheduling and allocation problem

I have to solve a problem in the field of operations research. I want to gather some general approaches to evaluate them to pick the most promising to design a problem-related program. Problem ...
1
vote
3answers
2k views

How do I convert a list of Requirements into Constraints?

I am trying to prepare my first software design document. I am self-taught and have no formal training in CS. Having done a wee bit of reading up on it beforehand, I have created a list of ...
1
vote
3answers
260 views

Shall we always use IoC in our designs?

I was studying Mediator Pattern and I noticed that to use this pattern you should register the Colleagues into Mediator from the Colleague concrete classes. for that we have to make an instance of ...