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

learn more… | top users | synonyms (1)

0
votes
0answers
29 views

JMS for synchronous calls vs leaving homebrewed messaging system?

I'm refactoring existing code. Right now the code has a main server with a CLI and restful interface as seperate applications which communicate with the server via a home-brewed message passing ...
1
vote
1answer
55 views

Separate domain entity in small ones

I have the Customer entity, this entity has a huge list of attributes, so you are thinking in separate in small entities (for example: "basic info", "document", "declarations", etc). This approach ...
2
votes
2answers
97 views

Form cancellation. Where should any data rollback occur?

You have a form that has an object injected into it. The user interacts with the form and updates the injected object via the UI. If the user then 'Cancels' the form, whose responsibility is it to ...
2
votes
0answers
90 views

How is intermediate data organized in MapReduce?

From what I understand, each mapper outputs an intermediate file. The intermediate data (data contained in each intermediate file) is then sorted by key. Then, a reducer is assigned a key by the ...
3
votes
2answers
234 views

Object-Oriented design and proper Java architecture for my program

This is the very first time that I think I want to create a program which really uses OOP principles and I want to do it in the most effective and efficient way. First of all we are given this ...
1
vote
1answer
291 views

Creating a online database creator

I've been thinking of creating an online database creator (think DabbleDB, Zoho Creator, Intuit Quickbase, etc.). I've been thinking of a couple solutions: Have 4 database tables: Tables, Rows, ...
2
votes
2answers
105 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 ...
2
votes
2answers
289 views

Front controller in PHP

When you are reading about web application development, "front controller" and "single point of entry" are frequent words you are confronted with. To my understanding, the point is to provide a single ...
7
votes
7answers
4k views

OO Design related questions in technical interviews

I've been attending quite a few interviews recently and have been asked by companies to answer "design a [insert model]" questions more than a few times. Is this normal in the industry nowadays? ...
2
votes
1answer
108 views

What design route should I take?

So I've taken on a project at work that I'm having a hard time attacking, and I'd love some feedback and suggestions. I work for an online retail store where we have an old, +7k-line script that we ...
0
votes
1answer
150 views

Design and write my own logger engine [closed]

I know that in this way I could reinventing the wheel, but my logging needs are quite unusual and I don't know how to achieve this unusual result with log4net, last (but not the least) I would catch ...
2
votes
1answer
231 views

DDD: Domain Model Factory Design

I am trying to understand how and where to implement domain model factories. I have included my Company aggregate as a demo of how I have done it. I have included my design decisions at the end - I ...
2
votes
1answer
65 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
223 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. ...
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
6answers
363 views

How to visualize the design of a program in order to communicate it to others

I am (re-)designing some packages for R, and I am currently working out the necessary functions, objects, both internal and for the interface with the user. I have documented the individual functions ...
2
votes
4answers
228 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 ...
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 ...
0
votes
0answers
43 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
145 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 ...
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 ...
5
votes
4answers
407 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 ...
2
votes
1answer
97 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 ...
14
votes
2answers
615 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 ...
6
votes
2answers
1k views

Cyclomatic Complexity Ranges [closed]

What are the categories of cyclomatic complexity? For example: 1-5: easy to maintain 6-10: difficult 11-15: very difficult 20+: approaching impossible For years now, I've gone with the assumption ...
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 ...
1
vote
2answers
135 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 ...
2
votes
2answers
346 views

Package diagram for an MVC patterned project?

We are required to make a package diagram for our senior project. Since our project uses MVC patter design, we created an MVC class diagram, now, our problem is in creating the package diagrams from ...
4
votes
2answers
463 views

Log design approach

Logging was always a nightmare for me! Now I have to implement it again for a proxy system. In this proxy application, some systems ask proxy system to call some other services. What I have to log is ...
-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. ...
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 ...
37
votes
11answers
27k views

SQL: empty string vs NULL value

I know this subject is a bit controversial and there are a lot of various articles/opinions floating around the internet. Unfortunatelly, most of them assume the person doesn't know what 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
337 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
233 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
3answers
236 views

About classes and their valid states

I get stuck each time I need to write a constructor for any class I design. The reason is that I am not sure what should go into a constructor and what should not. On googling for this, I got the ...
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 ...
1
vote
1answer
260 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
0answers
54 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 ...
2
votes
2answers
134 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 ...
-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 ...
-5
votes
1answer
1k views

Singleton: Is Singleton an Anti-Pattern [duplicate]

Was reading an interesting blog post on Singleton design pattern which is so widely used. If it's stupid or as in some quora posts, its an anti-pattern why is it so widely used even in frameworks. ...
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 ...
15
votes
5answers
10k views

What is the difference between “data hiding” and “encapsulation”?

I'm reading "Java concurrency in practice" and there is said: "Fortunately, the same object-oriented techniques that help you write well-organized, maintainable classes - such as encapsulation and ...
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 ...
9
votes
2answers
387 views

Where do we put “asking the world” code when we separate computation from side effects?

According to Command-Query Separation principle, as well as Thinking in Data and DDD with Clojure presentations one should separate side effects (modifying the world) from computations and decisions, ...
1
vote
0answers
87 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 ...