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

learn more… | top users | synonyms (1)

0
votes
1answer
117 views

Map Library: Client-side or Server-side?

As I have already asked here, I have to implement a Multi-Platform Map application. Now I have Mapstraction as an option which uses Javascript to implement the desired functionality. My question is, ...
6
votes
2answers
220 views

Considerations when designing a file type

I'm about to start writing a process for saving some data structure from code in to a file of some proprietary, as-yet-undefined type. However, I've never designed a file type or structure before. ...
4
votes
1answer
356 views

Object oriented wrapper around a dll

So, I'm writing a C# managed wrapper around a native dll. The dll contains several hundred functions. In most cases, the first argument to each function is an opaque handle to a type internal to the ...
2
votes
2answers
179 views

Best approach for saving highlighted areas on geographical map

I am designing an application that allow users to highlight areas of a geographical map using a tool that is like brush or a pen. The tool basically draw a circle with a single click and continue ...
3
votes
3answers
182 views

Library Organization in .NET

I've written a .NET bitwise operations library as part of my projects (stuff ranging from get MSB set to some more complicated bitwise transformations) and I mean to release it as free software. I'm a ...
1
vote
1answer
166 views

How to implement string matching based on a pattern

I was asked to build a tool that can identify if a string match a pattern. Example: {1:20} stuff t(x) {a,b,c} would match: 1 stuff tx a 20 stuff t c It is a sort of regex but with a ...
3
votes
1answer
80 views

Event system architecture for networking when performance is concerned

How should I design a system for an action game (think in Golden Axe) where events can happen remotely? I'm using TCP for this because the client is in flash. There's so many options, I can make a ...
12
votes
2answers
397 views

Looking for some OO design advice

I'm developing an app that will be used to open and close valves in an industrial environment, and was thinking of something simple like this:- public static void ValveController { public static ...
2
votes
4answers
969 views

Should I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority?

Can I build a multi-threaded system that handles events from a game and sorts them, independently, into different threads based on priority, and is it a good idea? Here's more info: I am about to ...
8
votes
4answers
422 views

Rapid prototyping and refactoring

Sometimes when I start a small project (like an android app), I don´t know which approach will work out at the end, and I just go for one approach and give it a try. But if I never used this approach ...
2
votes
4answers
411 views

Would Using a PHP Framework Be Beneficial in My Context?

I've just started work at a small start-up company who mainly uses PHP to develop their front-end apps. I had no prior PHP experience before joining, and this has led to my apps becoming large pieces ...
2
votes
2answers
269 views

Returning a mock object from a mock object

I'm trying to return an object when mocking a parser class. This is the test code using PHPUnit 3.7 //set up the result object that I want to be returned from the call to parse method ...
-1
votes
4answers
232 views

how do you seperate from designing question to programming questions?

As i try to program a solution to a request arise. I can't separate the difference between implementation problems and design problems. How do you specifically express the design problem?
0
votes
2answers
132 views

Plan variable and call dependencies [closed]

I'd like to write down the design of my program to understand the dependencies and calls better. I know there are class diagrams which show inheritance and attribute variables. However I'd also like ...
15
votes
8answers
1k views

Plagued by multithreaded bugs

On my new team that I manage, the majority of our code is platform, TCP socket, and http networking code. All C++. Most of it originated from other developers that have left the team. The current ...
4
votes
4answers
186 views

How to implement isValid correctly?

I'm trying to provide a mechanism for validating my object like this: class SomeObject { private $_inputString; private $_errors=array(); public function __construct($inputString) { ...
3
votes
1answer
1k views

Recovering an anemic domain model into a multitier architecture

I have spent the past several days learning about domain driven design and attempting to apply it to a current project. I decomposed the problem domain into the canonical logical components: domain, ...
4
votes
3answers
1k views

Is it a bad practice to use inline styling with generated code?

If I'm using a technology like Grails. It's really easy to wind up with inline styling. Are there any downsides to auto-generating code with inline styling? Is this considered bad practice? Why?
6
votes
3answers
602 views

How can I get better at explaining complex software processes to developers? [closed]

I'm really struggling with my software specs. I am not a professional programmer but enjoy doing it for fun and made some software that I want to sell later but I'm not happy with the code quality. ...
0
votes
3answers
277 views

How should compound words be handled when coding? Is there a definitive list of compound words? [closed]

QUESTION: How should you handle compound words when programming? Are there any good lists available online for developers of generally accepted technology-related compound words? I can see how ...
52
votes
12answers
4k views

Is it bad practice to pass instances through several layers?

In my program design, I often come to the point where I have to pass object instances through several classes. For example, if I have a controller that loads an audio file, and then passes it to a ...
3
votes
5answers
860 views

“TDD is about design, not verification”; concretely, what does that mean?

I've been wondering about this. What do we exactly mean by design and verification. Should I just apply TDD to make sure my code is SOLID and not check if it's external behaviour is correct? Should ...
2
votes
4answers
495 views

Is extensive documentation a code smell? [closed]

Every library, open-source project, and SDK/API I've ever come across has come packaged with a (usually large) documentation file, and this seems contradictory to the wide-spread belief that good code ...
2
votes
1answer
410 views

Tiling Problem Solutions for Various Size “Dominoes”

I've got an interesting tiling problem, I have a large square image (size 128k so 131072 squares) with dimensons 256x512... I want to fill this image with certain grain types (a 1x1 tile, a 1x2 ...
1
vote
2answers
264 views

Is it better to define all routes in the Global.asax than to define separately in the areas?

I am working on a MVC 4 project that will serve as an API layer of a larger application. The developers that came before me set up separate Areas to separate different API requests (i.e Search, ...
14
votes
3answers
1k views

How can you tell whether to use Composite Pattern or a Tree Structure, or a third implementation?

I have two client types, an "Observer"-type and a "Subject"-type. They're both associated with a hierarchy of groups. The Observer will receive (calendar) data from the groups it is associated with ...
4
votes
2answers
1k views

How is it possible to write the compiler of a programming language with that language itself [duplicate]

Possible Duplicate: How could the first C++ compiler be written in C++? You probably heard that Microsoft released a new language called TypeScript which is a the typed superset of ...
4
votes
1answer
175 views

Why is nesting or piggybacking errors within errors bad in general?

Why is nesting or piggybacking errors within errors bad in general? To me it seems bad intuitively, but I'm suspicious in that I cannot adequately articulate why it is bad. This may be because it is ...
-2
votes
2answers
941 views

ASP.NET MVC Controller separation best practices [closed]

I am very new in ASP.NET MVC and Web stuff. I want to know how I should separate my page logic into different controllers. Like for example should I use Home\BuyProduct or Product\Buy. When there is a ...
0
votes
3answers
157 views

Best practice to propagate preferences of application

What is your approach with propagation to all classes/windows of preferences/settings of your application? Do you share the preference_manager class to all classes/windows who need it or you make ...
7
votes
4answers
414 views

How to prevent duplicate data access methods that retrieve similar data?

In almost every project I work on with a team, the same problem seems to creep in. Someone writes UI code that needs data and writes a data access method: AssetDto GetAssetById(int assetId) A week ...
2
votes
1answer
88 views

String patterns that can be used to filter and group files

One of our application filters files in certain directory, extract some data from it and export a document from the extracted data. The algorithm for extracting the data depends on the file, and so ...
1
vote
1answer
271 views

design pattern advice: graph -> computation

I have a domain model, persisted in a database, which represents a graph. A graph consists of nodes (e.g. NodeTypeA, NodeTypeB) which are connected via branches. The two generic elements (nodes and ...
3
votes
1answer
572 views

What is the best way to diagrammatically represent a system threading architecture?

I am yet to find the perfect way to diagrammatically represent the overall threading architecture for a system (using UML or otherwise). I am after a diagramming technique that would show all the ...
2
votes
2answers
741 views

Is switch-case over enumeration bad practice?

I have an enumeration with the commands Play, Stop and Pause for a media player. In two classes I do a switch-case over the received commands. The player runs in a different thread and I deliver the ...
2
votes
2answers
1k views

Removing an element not currently in a list: ValueError?

This is something that's bothered me for a while, and I can't figure out why anyone would ever want the language to act like this: In [1]: foo = [1, 2, 3] In [2]: foo.remove(2) ; foo # okay Out[2]: ...
4
votes
1answer
976 views

Designing a system with different business rules for different customers

My company is rewriting our proprietary business application. The current architecture is poorly done and inflexible. It is coded more procedural oriented as opposed to object oriented. It has become ...
5
votes
3answers
549 views

What should be the minimal design/scope documentation before development begins?

I am a junior developer working on my own in the programming aspect of projects. I am given a png file with 5-6 of the pages designed, most times in specific detail. From this I'm asked to develop ...
0
votes
2answers
315 views

Software Architecture - From design to sucessful implementation

As the subject goes; once a software architect puts down the high level design and approach to a software that is to be developed from scratch, how does the team ensure that it is implemented ...
4
votes
1answer
603 views

is it allowed to create a app with overscroll feature?

As Apple won lawsuits against Motorola and Samsung with the so called overscroll patent, I am asking myself what the legal consequences of releasing an application with such a feature are? I think if ...
7
votes
3answers
724 views

Integrating with a payment provider; Proper and robust OOP approach

History We are currently using a so called redirect model for our online payments (where you send the payer to a payment gateway, where he inputs his payment details - the gateway will then return ...
22
votes
7answers
11k views

Why avoid Java Inheritance “Extends”

Good day! Jame Gosling said “You should avoid implementation inheritance whenever possible.” and instead, use interface inheritance. But why? How can we avoid inheriting the structure of an object ...
26
votes
9answers
2k views

Simple vs Complex (but performance efficient) solution - which one to choose and when?

I have been programming for a couple of years and have often found myself at a dilemma. There are two solutions - one is simple one i.e. simple approach, easier to understand and maintain. It ...
0
votes
1answer
190 views

What are some general guidelines for setting up an iOS project I will want to personally publish but sell in the future? [closed]

I have an idea for a personal iOS project that I would like to write and release to the iOS store. I'm the type of developer who enjoys developing and publishing. I want to write quality software ...
2
votes
1answer
398 views

Service Layer - how broad should it be, and should it also be used from the local application?

The background: I need to build a desktop application with some operations (CRUD and more) (=winforms), I need to make another application which will re-use some of the functions of the main ...
6
votes
2answers
1k views

Caching factory design

I have a factory class XFactory that creates objects of class X. Instances of X are very large, so the main purpose of the factory is to cache them, as transparently to the client code as possible. ...
-2
votes
2answers
182 views

Is it possible to outsource design properly? [closed]

I work in a company going through a downsizing process. It is assumed that a lot of "let go" developers jobs will eventually be outsourced. Some of those programmers had some design to do. Is it ...
3
votes
1answer
644 views

What is block level design in context of mobile application?

I was wondering if anyone can give me some direction related to "Block level design" in context of mobile application? Recently I saw a video in my university and a professional mentioned about ...
5
votes
4answers
2k views

How should UI layer pass user input to BL layer?

I'm building an n-tier application, I have UI, BL, DAL & Entities (built from POCO) projects. (All projects have a reference to the Entities). My question is - how should I pass user input from ...
2
votes
3answers
181 views

Overloading interface buttons, what are the best practices?

Imagine you'll have always a button labeled "Continue" in the same position in your app's GUI. Would you rather make a single button instance that takes different actions depending on the current ...