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

learn more… | top users | synonyms (1)

2
votes
1answer
63 views

scoping concern when dealing with coupling

I'm learning ruby (and OOP in the process) and I find keep having to write the same patterns when logging progress so I want to wrap this up in a logging library that my other code can then just pass ...
2
votes
2answers
222 views

On which abstraction level would you do TDD?

Problem I find myself nailing the class structure down by having too many unit tests which makes making changes hard. Example Assume we have a class A which uses classes B1 and B2. Class B1 uses ...
1
vote
2answers
111 views

Maintaining independence between modules

I am reading Algorithms 4th Edition by Robert Sedgewick and in chapter 1.2 it discusses API design. It says: "The key to success in modular programming is to maintain independence between modules. ...
0
votes
2answers
124 views

Best way to display domain object summary information efficiently and in an OO way from a large inheritance tree?

I've provided only simplified code as it's more of an abstract design question. So I have many, many nested business/domain event objects, e.g. public class Event { //bunch of properties and ...
0
votes
1answer
103 views

Using a variable in a Global context in webapps

In a webapp, I have a scenario where I need some kind of global context (Static like) for few variables, for the current thread only. If there are 3 different concurrent users, then I expect three ...
0
votes
0answers
41 views

wrap mysql API for gui use

Some time ago now, I've written a command-line tool, that connects to MySQL, and through a series of commands, does all sorts of good stuff. It was originally intended to be used by myself and, ...
1
vote
1answer
141 views

Unit testing methods with logical dependencies on other classes

Suppose I have an interface declaring the following method signature: SearchResults SearchProducts(string type, string filter, string anotherFilter); Inside a concrete implementation of this, I ...
0
votes
0answers
47 views

Distributing Contestant Entries Between Multiple Bins, Is this Knapsack?

I am an algorithm novice and am faced with a rather difficult problem. I working with contest's. There are contestant - individual player entry - contestants can have multiple entries into a ...
25
votes
7answers
1k views

Are classes with only a single method a problem?

I am currently working on a software project that performs compression and indexing on video surveillance footage. The compression works by splitting background and foreground objects, then saving the ...
2
votes
1answer
95 views

Mental schema for SQL queries

While preparing SQL introductory material, I've ended asking myself about the line of thought followed by a developer when writing a query. I believe it could be too valuable from a beginner's point ...
1
vote
0answers
117 views

How to organize points on a sphere in bins and navigate between bins?

I'm having trouble coming up with a suitable way to navigate through a set of star coordinates in the Equatorial Coordinate System. My goal is to display those which are within a given range of ...
1
vote
2answers
177 views

Large number of projects for a single application

I'm working on 300K line C/C++ Windows application that is spread across 23 different Eclipse projects (approximately one third for Qt interface, one third for DLLs and one third for static ...
14
votes
2answers
613 views

Which is better: a bunch of getters or 1 method with a selection string parameter?

Our knowledge domain involves people walking over a pressure-recording plate with their bare feet. We do image recognition which results in objects of the 'Foot' class, if a human foot is recognized ...
-1
votes
4answers
228 views

“A well designed system is a testable system” [closed]

I'm thinking about something I've read in a book: "A well designed system is a testable system" and I'm wondering why it is so. Certainly, a system that is much tested is probably well designed. ...
1
vote
2answers
132 views

Is eventual consistency a wrong solution for e-commerce applications?

I'm reading about eventual consistency in couchDB. I'm somewhat confused by the term and its consequences on an application. Let's say I'm building a distributed e-commerce website where monetary ...
5
votes
5answers
507 views

Martin Fowler's Refactoring book: switch statement is using other object's data, why is that bad ? A deeper explanation is sought for.

In the code sample below the Rental object is using Movie's fields to do a switch statement. Martin says : this is a bad idea but he does not give any deeper explanation as to why ? Of course, you ...
0
votes
3answers
115 views

Is it better expose a collection or an API to the collection?

Take for example the following: public interface IManager { void AddItem(CollectionItem item); void RemoveItem(CollectionItem item); } public interface IManagerCustomCollection { ...
0
votes
0answers
33 views

C# Code Design Issue [duplicate]

I am building a small application and I am trying to understand the best way to approach the design. I am looking for some guidance/advice how best to approach the following issue. Please bear with ...
5
votes
4answers
394 views

Why doesn't Haskell have a 'format' function for string interpolation?

I'm trying to use Shake and I stumbled upon the following problem: there's no easy and convenient way to interpolate a string. I know about Text.Printf — it's not what I'm looking for. The ...
0
votes
2answers
146 views

How to remove redundant code that enables button. Or “if” statement

I got probably "micro optimization" problem. I got "History number", "Next Number", "Reset" buttons, as well "label" for text. Every time I click At "Next number" button I would like to show random ...
5
votes
2answers
336 views

How to Know When to Stop Designing? [duplicate]

First some backgrounds, I'm interning at a company that makes parallel processing hardware. We're currently working out the design for a component of our driver that is supposed to evolve over a few ...
3
votes
1answer
226 views

State pattern vs Inheritance

In the following image for the State Pattern from Applying Domain-Driven Design and Patterns: With Examples in C# and .NET I'm trying to persist the SalesOrder entity into the database. Normally I ...
1
vote
2answers
224 views

How to determine the better design?

What do I need to consider to determine which design I choose when I have the following scenario? There are two cases to considerer; Given T a generic class, I have to do something with multiple ...
0
votes
0answers
51 views

Creating A News Feed with Relevant Data for App

I'm creating an app that currently allows users to create topics, vote in topics, follow topics, and chat in topics. Currently working on creating a News Feed like Facebook or Twitter that brings ...
-1
votes
1answer
56 views

How to handle returns when incorporating coupons or discounts in Point of Sale? [closed]

What is the proper way to handle determining the amount to return to a customer when dealing with coupons and discounts applied to receipts? [Scenario A] A receipt contains items each with their own ...
2
votes
4answers
226 views

How to organise the different bits and pieces in an agile environment?

Trying to make our shop an agile environment, we struggle with some bits and pieces of that world. While not making it waterfally, we do have to have some sort of agreement on what a new feature needs ...
0
votes
1answer
125 views

Separating entities in the business logic layer

I am going to start a project, which in the BLL would have something like: Jumper Map Record I need to keep track of all those, so I will make probably classes which hold them, e.g.: JumperList ...
4
votes
0answers
142 views

Loose Coupling Presenter to View in MVP

We work in a Java shop here and our web application uses an implementation of the MVP architectural pattern. Our manager comes from a .NET world, where he has been exposed to the MVVM design pattern. ...
1
vote
1answer
137 views

Optimizing mindmaps by finding the least amount of redundancy

When using mindmaps, you order them based on how you think it fits best. So for instance (tab means subtree) requirements dinner food forks spoons breakfast food forks this ...
0
votes
2answers
263 views

Is there any way without looking at the source code to know how modular the code is [closed]

I've been working with TDD, most patterns, mostly OO code and still not found a way of knowing if a particular piece of code confirms to modularity , without the need reviewing the code. On a recent ...
1
vote
0answers
86 views

UML diagram for an existing implementation

I have some code, which I want to present in UML, but I've stuck at one point. Let me tell you something about code's functionality. I have a workspace in which I can place some Components, select ...
0
votes
2answers
81 views

I need advice for a subsystem design?

I'm doing it in C++, I can't post the entire thing, because it's gigantic, I'll just sum it up with a simple example.I have: class B; class A { //Members and methods... void DoSomething(B* ...
0
votes
0answers
54 views

Access Control List with many roles

I normally have 2 roles in most of my websites, i.e. Admin and Member and create one folder for each Role like /Root /admin /member but now I have come up with 10 Roles besides Admin and ...
13
votes
3answers
632 views

Phenotropic Program Design

I recently ran across an idea put forth by Jaron Lanier called "phenotropic programming." The idea is to use 'surface' interfaces instead of single point interfaces in computer programs utilizing ...
2
votes
3answers
240 views

Framework in which views are defined in the database - design flaw or reasonable?

I'm working with a framework where the fields displayed on each web page are defined in the application database. Administrators can add new fields to pages or hide/completely delete old fields. The ...
-1
votes
1answer
99 views

What is meant by a step-by-step refactoring plan describing implementation of design [closed]

What is meant by a step-by-step refactoring plan describing how to implement a certain design? As little as I know about refactoring it regards improving a (UML) design model and has nothing to ...
2
votes
2answers
104 views

Distribution of Event Listeners in a Distributed Service Oriented Architecture

I have a service architecture composed of services that service common areas of the application. Examples of services would be: AccountService (manages client accounts in the system) BillingService ...
5
votes
7answers
350 views

Scrum decision making versus maintainability and development time? [closed]

I appreciate that this question may be controversial. In a sense, it is the flip-side of the question "Business trying to make technical decisions". In Scrum, the development team is supposed to be ...
5
votes
2answers
351 views

Game server code design

I'm designing a multiplayer game server where the players are in rooms. Right now I have classes to take care of the client, networking, etc. I'm struggling however to find a design for this Room ...
-1
votes
1answer
75 views

When to use non-embedded databases over embedded databases [closed]

We are trying to start a web base project that need to develop based on MS technologies such as C#,.net, IIS etc. This is a web application suppose to sell as a product with a single installer. Now ...
2
votes
2answers
65 views

Ordering menu items fed from multiple modules.

I have a main application that can load modules (or plugins). Each modules can define one or more links (or items) that will be displayed in a side menu defined in the main application. Right now, my ...
1
vote
1answer
98 views

How to deal with hard configurations at the component level?

I distinguish three organisation levels while programming: the library level, the component level and the application level. A library defines functions to solve a range of related problems or ...
6
votes
2answers
413 views

What's the reason for C standard to consider const-ness recursively?

The C99 standard says in 6.5.16:2: An assignment operator shall have a modifiable lvalue as its left operand. and in 6.3.2.1:1: A modifiable lvalue is an lvalue that does not have array ...
5
votes
3answers
222 views

Is there a guide for software development to design efficient hotkeys for actions?

I don't know how to word this easily but basically the software I am writing has a ton of actions and I want to assign hotkeys to every one of them so power users can work super fast. First off they ...
1
vote
1answer
159 views

Create an Objective-C category to route methods depending on a specified type

For one project, I needed to find a solution to avoid code like this: if ([self.desiredColor isEqualToString:@"Red"]) [self constructRedMenu]; else if ([self.desiredColor ...
0
votes
0answers
43 views

Designing online exam [duplicate]

I need to design an online exam server for an exam like GRE in which question difficulty increases if you answer correctly and decreases if you answer wrong. Questions are multiple choice ...
0
votes
2answers
197 views

Is it a good idea to const-qualify the fields of structure in C?

Consider the following program: #include <stdlib.h> #include <stdio.h> typedef struct S_s { const int _a; } S_t; S_t * create_S(void) { return calloc(sizeof(S_t), 1); } void ...
2
votes
2answers
513 views

Building a distributed system on Amazon Web Services

Would simply using AWS to build an application make this application a distributed system? For example if someone uses RDS for the database server, EC2 for the application itself and S3 for hosting ...
4
votes
1answer
318 views

How to design application with rollback capability

I am currently working on an application (basically its a kind of execution engine capable of running user defined jobs and generate output in real time) that needs to handle rollback functionality, ...
2
votes
1answer
133 views

Inheritance in test classes

I have an interface Serializer with methods serialize and isSerializerFor. I created a first implementation of this using TDD, and ended up with a nice clean test case fully covering a nice clean ...