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

learn more… | top users | synonyms (1)

2
votes
2answers
334 views

How to structure a class in python

I have come to python from C++ (I also know a little Java). I am writing code to exercise a server so I basically use http methods to send a load of requests to the server. As part of my code I ...
2
votes
4answers
836 views

How to practice ATDD if design is not yet emerged from TDD?

Despite being very stakeholders friendly, ATDD aimed to provide a "stop" line when a feature has just been done. This avoids wasting time to add non-focused (and sometimes useless) code. That's why ...
0
votes
1answer
322 views

Version-control friendly, append-only file format: “binary” or “text”?

I'm designing an append-only ("journaled") file format, and I'd like it to be friendly towards being stored in VCS (git/Mercurial/...). On one hand, I'd like if after each change, only delta ...
2
votes
1answer
690 views

Modern practices for stored procedure-based applications

I work in a fairly large and old solution that has many entry points for different kinds of clients, with web sites for public access, web sites for internal access, some web sites and web services ...
6
votes
3answers
561 views

Where to load and store settings from a file?

I think this question should apply to most programs that load settings from a file. My question is from a programming point of view, and it is really how to deal with the loading of settings from a ...
1
vote
1answer
185 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 ...
2
votes
1answer
285 views

TDD / one test representing the whole scenario ? or should I split it? [duplicate]

While practicing TDD, I came across this specification: A user should be created with its password hashed, be persisted and an activation token should be returned. Should my first unit test, (aiming ...
1
vote
1answer
855 views
-1
votes
1answer
505 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 ...
1
vote
1answer
265 views

Do Flexibility and Inconsistency,Unsafety Overlap?

I was lately doing some research about different programming languages. I was interested particularly to learn unique features of popular programming languages and situations where these assets shine. ...
4
votes
1answer
1k views

Mixing Fowlers Transaction Script and Domain Model

I am developing a large application where the previous developer used Martin Fowlers Transaction Script pattern. The requirements are becoming more complex and it is becoming a bit of a maintenance ...
7
votes
3answers
1k views

Using a Directory Service instead of a Database

I've just started working on an existing application that uses an LDAP directory service as its object store instead of a database. Many of my coworkers have been commenting how an application should ...
1
vote
4answers
264 views

Provide both RESTful interfaces and Java ones?

I am writing a RESTful service in Java, of course it's typical HTTP based interface. I am wondering should the service provide Java interface which has same semantic to the RESTful interface? I think ...
2
votes
2answers
372 views

Event based logging. Is it a good idea and is it ok to pass a handle to a “logged” object?

Hi I have fairly complex program that is doing computations in a quite large loop. I want to log some basic statistic about the run to be able to analyze its performance over time and vs loop number. ...
5
votes
1answer
6k views

What is the general format of a Software Design Specification?

I'm trying to document a piece of software I wrote in detail. An SAS is too high level and doesn't cover the API. I found several examples of an SDS online, but I don't see a trend in their format. ...
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 ...
0
votes
2answers
199 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 ...
3
votes
1answer
238 views

Processing every leaf under a node in a tree efficiently

Short version: In a tree (non-binary) with many levels of children, where each node can have multiple leaves, what is the best way to tally leaves that meet a certain condition given a node? Long, ...
1
vote
5answers
650 views

Is it sometimes reasonable to cut corners and expect to re-write software in a couple of years? [duplicate]

I work for an organization with one developer (me) and one DBA. When I started, the previous developer had developed applications that had bad architectural practices and it was getting and more time ...
1
vote
3answers
334 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 ...
2
votes
3answers
4k views

Should I represent the Database in my use cases?

I am creating use cases for my web application and I was wondering if a representation of the DB should be listed as an actor. For example a user can check his profile and edit it (assuming that he is ...
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 ...
0
votes
1answer
397 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 ...
11
votes
1answer
5k 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 ...
13
votes
4answers
605 views

Do these specific tables need surrogate keys?

Background I have this tables +-------------------------+ +------------------------+ |Airport | |Country | |-------------------------| |------------------------| ...
4
votes
3answers
289 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. ...
1
vote
1answer
65 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 ...
0
votes
2answers
224 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 ...
2
votes
1answer
245 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
676 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 ...
5
votes
1answer
373 views

Class Naming Conundrum

I am working on a personal project that works with databases, and in this project I have a set of classes that are similar, so they inherit from a common base class. The problem I am faced with is ...
59
votes
10answers
4k views

My proposed design is usually worse than my colleague's - how do I get better? [closed]

I have been programming for couple of years and am generally good when it comes to fixing problems and creating small-to-medium scripts, however, I'm generally not good at designing large scale ...
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 ...
5
votes
3answers
356 views

Generic and type safe I/O model in any language

I am looking for an I/O model, in any programming language, that is generic and type safe. By genericity, I mean there should not be separate functions for performing the same operations on different ...
2
votes
2answers
489 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
353 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 ...
1
vote
1answer
607 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
268 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: ...
9
votes
4answers
10k views

How to make creating viewmodels at runtime less painful

I apologize for the long question, it reads a bit as a rant, but I promise it's not! I've summarized my question(s) below In the MVC world, things are straightforward. The Model has state, the View ...
3
votes
1answer
904 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, ...
0
votes
2answers
133 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 ...
0
votes
1answer
141 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 ...
1
vote
3answers
275 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 ...
13
votes
3answers
778 views

Is reliance on parametrized queries the only way to protect against SQL injection?

All I have seen on SQL injection attacks seems to suggest that parametrized queries, particularly ones in stored procedures, are the only way to protect against such attacks. While I was working (back ...
2
votes
2answers
238 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 ...
2
votes
3answers
830 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 : ...