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

learn more… | top users | synonyms (1)

2
votes
2answers
39 views

Similar multidimensional array detection

I'm looking for some sort of algorithm so I can quickly identify similar matrices, the matrices are not stored permanently so I'd need a way of mapping each matrix to an easily stored values, after ...
1
vote
2answers
80 views

DLL or web service for common functions?

We have a variety of basic functions (date utilities, email sending, internal math calculations, etc) that are currently in an old VB.NET project. We're going to move towards C# and I'm wondering if ...
-2
votes
0answers
32 views

Where can I find an API that can understand the meaning of queries? [on hold]

Freebase is neat. It has all I need but unfortunately it's shutting down. I'd like to use an API that can understand the primary types of the queries that I'm sending not only by processing its ...
6
votes
8answers
3k views

Why can't SQL return joined tables in a nested format?

For example, say I want to fetch a User and all of his phone numbers and email addresses. The phone numbers and emails are stored in separate tables, One user to many phones/emails. I can do this ...
1
vote
3answers
245 views

Object creation: when should I expose a factory vs wrapping class?

I am having some problems trying to figure out when to use a factory or to wrapper class. This question is slightly geared towards C# I guess, so I'm not sure if this is the correct place to ask. Say ...
1
vote
2answers
108 views

Designing Message class in Java

I'm writing a class for Message. Message comes with Header and Payload. Header has following fields: Version Type For Type "XYZ", the following Payloads are allowed. Configuration Metafile ...
2
votes
10answers
1k views

How do I determine if customers have already received a newsletter?

The problem: When we were sending newsletters to customers, there was no way to confirm if the customer already received the mail. We have come up with two different approaches: (Boss's Idea) Each ...
2
votes
2answers
84 views

Domain driven design, can two aggregates have the same root?

For the purpose of separating different functionality into different classes, I have two following Aggregates: ActiveEmployee AssignTask () ReassignManager () Deactivate (string reason) ...
0
votes
2answers
9k views

Simple real-world PHP OOP example?

I'm trying to learn PHP OOP, but when I've followed tutorials, all the examples seem to involve things like: class Human { $_sex; public function setSex($sex) { $this->_sex = ...
0
votes
0answers
33 views

Is it realistic to expect to create a livestream platform from scratchish? Is there a better way?

I am intending to create a livestream based website tailored towards a specific purpose, preferably with an optional anonymous side to uploading. As far as I can see I have two options: Create my ...
4
votes
2answers
110 views

How to design for good abstractions using algebraic data type?

Every now and then I have peaked at Haskell Tutorials and found the Algebraic data types quite interesting. I took their purpose to be to represent types that have completely separable states. Sadly, ...
-7
votes
1answer
38 views

Tools to develop software for a company [on hold]

I'm developing a software module for a company as part of a school project. I am a decent programmer but I have never built a software module in a professional context. Which tools do I have to know ...
3
votes
3answers
86 views

Would implementing a “Throwable Event System” be abusive?

I have been thinking for a couple years now about using Throwable events and implementing a sort of event system that uses throw to dispatch an event, or let a different method handle it with throws. ...
1
vote
1answer
351 views

MVC URL structure with URI parameters

When creating routes for your MVC web application I have seen two possible ways to pass variables to a controller method: With the first approach the variable is passed to a parameter of the ...
8
votes
4answers
347 views

Is Visitor Pattern valid in this scenario?

The goal of my task is to design a small system which can run scheduled recurring tasks. A recurring task is something like "send an email to administrator every hour from 8:00 am to 5:00 pm, Monday ...
-4
votes
0answers
28 views

Proper framework for developing on Android

I've been developing Android apps for almost 2 years now. I mainly do it as a hobby or as a way to spend my free-time being a college student. All that time I've never really used a proper framework ...
0
votes
2answers
69 views

How should an API or server respond when a device connects with a different account than it is bound to?

In my system we have users accounts and user devices. Rules: A user can have only one user account. Each user can have many devices. A device can be bound to only one user account. Upon initial ...
1
vote
3answers
86 views

Performing data operations that involve separate applications and data sources

I'm designing an enterprise application that produces output based on some input data from another application. In this case, I happen to have also built and thus do control the source application ...
-2
votes
1answer
77 views

Java - Concept question: LinkedHashMaps vs POJOs?

EDIT: I'm just going to ask a single question instead of presenting a problem and asking for advice on a specific design decision in the solution. Given a batch of data from a database, collected ...
1
vote
2answers
110 views

When writing a library or an API, when should and when shouldn't I validate or automatically correct errors in data provided by another developer?

I have a fairly good understanding of when data validation should and shouldn't exist when it comes when writing an application that is only dealt with by an end-user, and all the different tiers of ...
6
votes
3answers
263 views

Quick and Good: ( Requirement -> Validation -> Design ) for self use? [on hold]

How to casually do the required Software Engineering and designing? I am an inexperienced developer and face the following problem: My company is a start up and has no fix Software engineering ...
1
vote
0answers
42 views

How to expose the domain model as options to drive the view behavior

First off, I'm not thrilled with the title, so I'm open to suggestions there. Here's my question: I'm designing a simple application that takes input from a user and produces an output document. ...
8
votes
5answers
9k views

Should I use abstract or virtual methods?

If we assume that it is not desirable for the base class to be a pure interface class, and using the 2 examples from below, which is a better approach, using the abstract or virtual method class ...
2
votes
2answers
114 views

Does this data processing pipeline design need to be so complex?

I have a data processing pipeline with well defined stages and IO boundaries. I can choose a language to suit the needs of this design. It starts with an InputObject. At the end of each stage, ...
-3
votes
1answer
69 views

What is the best way to protect highly sensitive algorithms in my code?

I develop software for day traders and institutional investors. Some of their algorithms are highly sensitive, but they still want to sell these programs to different customers. The programs ...
3
votes
3answers
198 views

Is this a good method to create class hierarchies?

Is it a good design to store the type of the object in the base class as an enum? For example, consider the following hierarchy Expr --Unary --Binary --Const ----Int ----Float How to represent the ...
2
votes
2answers
190 views

Problems with OO design for application with pluggable components

I'm trying to refactor an ugly code and make it easly extendable in the future. The application should be nothing else but a series of components that have input(s) and output(s). The components ...
18
votes
6answers
10k views

What are the pros and cons of HTML5, native and hybrid mobile app approaches?

I want to develop a mobile application. I recently read an article on Telerik Forum, which compares among three types of mobile application and I don't know which one should I select to begin with. ...
3
votes
3answers
155 views

Design suggestions for converters in Java

I'm trying a set of converters which will convert an object to some older form. And there are different objects which are converted. By older form I mean changing the values of some fields and in case ...
1
vote
0answers
51 views

Best architecure approach to develop iOS app

I'm trying to create a calendar app similar to this design: Calendar Design I'm currently using this calendar framework: CVCalendar and it's working great, but my question is, what do you think is ...
0
votes
0answers
34 views

How do I structure a URL with several querystring items? [duplicate]

I have a URL like this http://myserver/controller/action/var1/value/var2/value... Instead of ?var1=value... Is putting the variable name and value like that a good way to do this? I'm using a ...
7
votes
1answer
563 views

High resolution graphical representation of the Earth's surface

I've got a library, which I inherited, which presents a zoomable representation of the Earth. It's a Mercator projection and is constructed from triangles, the properties of which are stored in ...
4
votes
3answers
88 views

Parent class using methods defined in child

I am working on a large program (more than 10k lines of code). Below is a (hopefully not over-simplified) example of a problem I sometimes face: class MyClass1(object): def func_1(self): ...
1
vote
1answer
33 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 ...
5
votes
2answers
90 views

Should program arguments have mixed interpretations?

I'm developing a command-line tool that has many user options. Some of the options are lists of values. I'd like the program to be able to parse these listed options directly from the command line, ...
3
votes
3answers
342 views

Best approach for tracking dependent state

Let's pretend I work on a project tracking application. The application is a database backed, server hosted, web application. In this application there are Projects which have many Activities which ...
2
votes
3answers
102 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 ...
26
votes
5answers
1k views

How to explain why design choices are good? [closed]

As I've become a better developer, I find that much of my design skill comes more from intuition than mechanical analysis. This is great. It lets me read code and get a feel for it quicker. It lets me ...
2
votes
4answers
154 views

How wrong it is to have multiple associations between classes?

I'm modeling a college process, in which I have three classes: Student, Subject and Degree Degrees have their own subjects, students have a list of subjects they have passed, and also students should ...
2
votes
2answers
250 views

Refactoring long methods with a lot of cyclomatic complexity

I'm attempting to refactor what is becoming a very large method -- currently 350 or so lines -- that contains a high degree of cyclomatic complexity. I understand and ascribe to the theories that ...
7
votes
9answers
3k views

Multithreaded file copy

There is an utility we have which is used to upload files (and perform other operations on the file) to a network shared location. The file size tends to vary from a few mb to 500 mb. A suggestion has ...
4
votes
4answers
106 views

Business Layer Procedural?

The most common way I've seen of saving an entity into a database is through a class in a business / service layer. For example, when adding a new entity called User: User user = new User(); ...
1
vote
1answer
165 views

MongoDB Embedded vs Reference Private info

I have searched extensively for a similar Mongo schema design and can't find relevant examples. I have a store (with public info), each store has an account (with private account info). // store ...
2
votes
3answers
77 views

Large file / data transfer in a Microservice Architecture

My company is currently working on adopting a microservice architecture but we are encountering some growing pains (shock!) along the way. One of the key contention points we are facing is how to ...
1
vote
1answer
44 views

Design consideration on JSON schema for an API

I have an API endpoint that retrieve data from 3 SQL tables on the server-side. At the moment, I do a SELECT with joins, consolidate/reorganize the selected data based on a JSON schema, and then send ...
3
votes
1answer
86 views

OO design in a data processing pipeline

I'm wondering how to design a fairly simple class whose properties are complex to compute. Also, the properties depend upon each other for computation. An example using graphs and graph processing ...
1
vote
2answers
505 views

Is there a better way to organize my module tests that avoids an explosion of new source files?

I've got a neat (so I thought) way of having each of my modules produce a unit-test executable if compiled with the -DTESTMODULE flag. This flag guards a main() function that can access all static ...
-2
votes
0answers
59 views

OOP vs ADM Comparisom

This is the ADM equivilant to the example code given in Correct placement of Methods in OOP In this example we have resolved the Method placement question by moving ALL methods away from the data, ...
3
votes
4answers
252 views

Design method to return List of objects

I need to create a method which will return a List of IRule objects. This is what I have written, am I correct in the approach? Or should I follow any patterns/principles? public IList<IRule> ...
2
votes
4answers
263 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 ...