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

learn more… | top users | synonyms (1)

0
votes
5answers
170 views

Should we always DRY? Any edge case examples of when not to?

I've only ever been working in higher level languages, C#, JavasScript, etc. A couple of moments ago someone asked this question on SO. Now I'm curious to know, for some of the lower level ...
2
votes
0answers
28 views

Seeking opinions on using device tree for I/O definition

I've been working ELLCC, a clang/LLVM based development tool chain targeting ARM, Mips, Microblaze, PowerPC, and x86 targets. The tool chain is pretty complete and runs on Linux, Windows, and Mac OS ...
4
votes
2answers
87 views

Is it considered good practice to declare base interfaces without mutators, supplying mutatators in a sub-interface

I asked a question on StackOverflow on how to properly implement an ImmutableMap that abides by the SOLID principles. Due to Java's Map interface containing put and putAll, it violates the interface ...
2
votes
1answer
73 views

Should I consider uncertain future requirement while development? [duplicate]

I have one text box across multiple pages which is used to enter multiple customerids (as comma separated) . But in current page due to some subsequent implementation difficulties we make it as ...
-3
votes
0answers
36 views

Should I write the Server side program while creating a website? [on hold]

I want to create a website. I know html5 and css. I am still learning JavaScript. I found that these are used for client side, and now I have found that there is also server side which also needs ...
3
votes
2answers
149 views

Is embedding URLs as query parameters in URLs an acceptable REST API design pattern? [on hold]

We are designing some resource oriented web services. Service B needs to be able to make calls to Service A passing in a reference to a resource in service B that service A will use when formulating ...
-1
votes
0answers
64 views

When should inheritance NOT be used in a program design? [closed]

I have read into the debate on if inheritance should be used often or not and have found a few good points, but could some one present a good example of when inheritance should not be used?
0
votes
0answers
55 views

Should a 12Factor App persist config in the DB?

The 12factor approach to config is The twelve-factor app stores config in environment variables...they are a language- and OS-agnostic standard. I've worked on many (rails) projects where ...
3
votes
3answers
231 views

Can a the kind of load Uber handles be served from just one server?

http://techcrunch.com/2013/12/04/leaked-uber-numbers-which-weve-confirmed-point-to-over-1b-gross-revenue-213m-revenue/ This article says that Uber does about 1M requests a week. Which is about 1.65 ...
1
vote
3answers
46 views

Clarification on Acquire/Release Semantics in multithreaded programming

In an attempt to fundamentally understand any concept, I try to understand the meaning of the words within the context it is being used. Currently, I am trying to fundamentally understand the whole ...
1
vote
2answers
114 views

Dependency injection vs dependency lookup in a layered architecture

Given a layered architecture, where the business logic is isolated in a package from all other layers, like persistent storage, user interface, interfaces for various (vendor) remote services, etc, I ...
1
vote
1answer
39 views

What's the best way to store class/type info in a plugin system in your software?

There are lots of applications like 3ds Max, Maya, etc that allows you to use plugins, where even the default nodes are created as plugins. This is all good but if the developer changes the ...
1
vote
1answer
53 views

Rich object model in the context of a good REST API and of an existing rich object model on the server-side

First off, let's frame this question in the context of a good REST API and an existing rich object model on the server-side, as well as modern web architecture (MVC frameworks like angularjs). I'm ...
-1
votes
1answer
55 views

Pathfinding in a 3d world with obstacles?

What are some methods for pathfinding in a 3d world? Object X needs to move from Point A to Point B but it might have to avoid things like asteroids, planets or gas pockets that makes the object ...
3
votes
1answer
68 views

Consistent snapshot

Suppose process A has a consitent snapshot of some entities. And it is constantly receiving updates for this enteties. Now client B connecting to A and it should receive the consistent snapshot of ...
-3
votes
1answer
76 views

Class refactoring [closed]

I have many rows in databases that are in fact classes, eg: 1-2 3-4 .. 10+ Something Now there are 2 options. One is to create class per table row (Something.class etc.), or to create single class ...
1
vote
1answer
29 views

Synchronization of resource that has moved out of requests filter range

I have a RESTful API with corresponding clients. If a client request fetches a set of resources (Events) based on a filter, say events taking place between 2015-04-13 - 2015-04-19. If an event which ...
0
votes
1answer
147 views

Full screen command line app that user cannot close in any way [closed]

All I'd like user to see is a "full screen" command line interface running my program. Users can enter certain input when prompted to, but they shouldn't be able under any circumstances to stop the ...
3
votes
0answers
112 views

Fine grained search over a large dataset

I have roughly 4 million records per day and have to keep 7 years worth online, so we are looking at 10.2 billion records that I need to be able to search through. The users are expecting that the ...
2
votes
1answer
86 views

Ambiguity of seemingly clear method names in APIs

(The question is language-agnostic, but to illustrate the point, I wrote the examples in C#.) Say I'm trying to model the behavior of "components" that communicate via "ports". I might model this ...
0
votes
0answers
88 views

Java server side : Is this a good design/layered approach? [closed]

We are in the process of designing an application using AngularJS, RESTful service (Jersey) and JPA for CRUD operations.The RESTful layer might call other external services to get data. There could be ...
1
vote
1answer
100 views

Does Go implicitly discourage getters and setters and encourage direct member access?

As the title says, is accessing public struct fields more idiomatic in Go than getters and setters? Wouldn't that lead to violation of data encapsulation, also public fields in other OO languages like ...
-1
votes
1answer
63 views

How to make variables inherent to an object or system

How can one make variables inherent to an object or system? For example, when creating a web browser, each option that is created for the user to have control over (i.e. how a window opens, if ...
2
votes
1answer
93 views

Is it OK to deprecate methods that need to be public due to the packaging model but are not to be used outside the codebase in Java?

I am currently working on a semi-large project that has several packages. There are 3 main packages, a "client" package, a "server" package and a "common" package. There are two jars, one for the ...
2
votes
3answers
263 views

Repetitive code over multiple classes. Best way to centralize code?

I'm working with 3D arrays that I flatten into a 1D arrays with the following index calculation: index = x + WIDTH * (y + DEPTH * z) I'm starting to notice that I'm using the calculation all over ...
1
vote
1answer
116 views

How to optimize the application with huge number of database requests per minute

I have to provide free demo of some service to end users in my application. Free demo could be of 30 mins, 1 hours, 5 hours etc. (predefined time) for a new user for one time only. User can also ...
2
votes
2answers
163 views

Archive Without Adding Dependencies [closed]

We're going back and forth on this problem and I'd like to have oppinions: We have a library calculating stuff and some module with GUI logic using it. We want to add some kind of archiving to the ...
2
votes
2answers
71 views

Creating an auto-patching system for Spring Hibernate Application

I have this question for few months now. We have a web application which has monthly changes and weekly bug fixes if any. Usually we just build the new war, undeploy the old ones and redeploy new ...
4
votes
1answer
204 views

Would SQLite be less useful without accepting inserts of non-numeric values into numeric columns?

In SQLite the following statement would be successful and the string would be inserted/updated into the SALARY column which is of type INTEGER: update employee set salary='TOO MUCH' where emp_id=1; ...
2
votes
2answers
179 views

Designing entities that should be mutable through the GUI but protected from programmer error

I have a set of entities, for now represented by very simple classes (further simplified for this example): public class Item { public string Name { get; private set; } public double ...
9
votes
2answers
329 views

Should HTTP Request/Response objects be immutable?

I think it's safe to say that most web applications are based on the request/response paradigm. PHP has never had a formal abstraction of these objects. One group is trying to change this: ...
4
votes
1answer
114 views

Parking Simulation Software Design

I've been requested to develop a quite well known problem for a job interview. The Parking Simulation which an example can be found here. I came up with some ideas for which design pattern should I ...
4
votes
1answer
134 views

Should I always throw the most specific or should I try to generalize exception types?

Say you normally have FooException. /** * @throw FooException If Foo is invalid for searching. */ public bool exists(Foo a) But at some point you need to have two more specific exceptions for ...
3
votes
2answers
110 views

What kind of base for Decorator: interface, abstract class, non-abstract

What should be at the top of inheritance tree of Decorator design pattern? I mean the base for both components and decorators non-abstract class: has data fields, implements methods abstract class: ...
1
vote
3answers
171 views

Avoid opt(options) in javascript [closed]

A lot of frameworks, most like jQuery plugins uses the "optional" parameter. Basically a dictionary (or key/value structure) with a bunch of additional parameters instead of send in the parameter's ...
2
votes
2answers
101 views

Too specific of namespacing/packaging

I'm about to start building a C# library for English and French morphology as a side project. The library will be later merged with other linguistic aspects (phonology, sentence parsing, etc). for ...
1
vote
1answer
93 views

How to evaluate the performance of a Data Access Layer b/w two ORM's?

I am currently working on a project where I am going to replace the Data Access Layer from a custom ORM to Entity Framework.(The product is almost complete and mostly any changes that will follow ...
1
vote
1answer
140 views

How to decide if object should request or receive data?

Deciding whether an object should request data (by calling a function) or receive data (by having a function called from another object) is probably dependent on the exact situation. So how do I ...
1
vote
1answer
149 views

Domain Driven Design - designing Aggregate Roots

Imagine you're designing an application for organizing Workshops. Workshop itself is quite complicated - it acts as a state machine with multiple possible states and transitions between them. We're ...
3
votes
2answers
68 views

Changing a design later down the track seems time consuming for its value

(For those who don't code, don't be intimidated by the code snippets in this question, they question is about approach to changing a design rather than the code design itself). Recently I put ...
3
votes
3answers
85 views

Approach to designing a workflow web app that contains some automation

I have been tasked with creating a web application which will provide end-users with a self help workflow, asking them questions and skipping to another part of the workflow depending upon the ...
0
votes
3answers
392 views

Who should write the Technical Design Document? The BA or the Developer? [closed]

I work as a Snr. BA in a large Manufacturing company and I've just implemented a new Requirements Management Process. We have a large range of internal developers who in the past have never been ...
1
vote
1answer
40 views

Clojure NameSpace Design

I am new to Clojure and trying to get a handle on organizing a project's namespaces. I am working on a solver for the knapsack problem. Currently, I have broken the modules into files, but everything ...
2
votes
1answer
322 views

How should I handle database failures in a web application? [duplicate]

I'm developing a simple RESTful API using Go's Goji framework (although this question is language-agnostic), in which parameters from the URL are queried against a PostgreSQL database. Here's how it ...
2
votes
1answer
194 views

When designing a data structure, should I implement very inefficient operations for convenience?

(I've added the .NET tags because the data structures are for .NET, and this question should be considered in the context of the conventions for that platform.) I'm writing a library of immutable and ...
2
votes
1answer
46 views

Converting a one-to-many xml design to a many-to-many

I have an xml file format that looks something like this: <topLevelTag> <category name="foo"> <item attrib="value">ItemName</item> <item ...
0
votes
0answers
54 views

Abstracting the data in a relational database. [duplicate]

While working with data, which is in a relational database I came up with this issue. At first, I was just writing helper functions to retrieve A SPECIFIC data I needed for the current problem but it ...
0
votes
1answer
58 views

Program design - how to improve it and how to avoid coupling (Python)?

In the Python program structure below there are two modules with functions. Problem description: Functions are used inside other functions all over the place. Strong coupling (dependency). For ...
1
vote
1answer
63 views

Is it okay to expose implementation components in a library?

I'm writing a library for general consumption (It's free software and open source). Is it okay to have a visible namespace (e.g. Library.Implementation) for implementation-only components that remain ...
1
vote
3answers
114 views

What is the best way to hold runtime arguments and use elsewhere in the application? [closed]

I have to design a java tool, which is intended to be called from shell scripts or batch scripts. The behavior of the tool is determined by a set of user defined parameters. This can vary from user to ...