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

learn more… | top users | synonyms (1)

0
votes
0answers
35 views

Design of a Smartcard listener [duplicate]

I have the task to write a listener which detects smartcards inserted into a terminal and notifies all registered classes. The listener needs to be accessible from different parts of a large ...
3
votes
3answers
169 views

What is the most efficient way to find a set of locations within a radius of a certain point?

Imagine a dataset of all the restaurants in the US (similar to Yelp, etc), how would you return a set of restaurants within a certain range of a particular zip code. (Assuming you have already a ...
0
votes
0answers
86 views

Addicted to Interfaces - Good or bad? [duplicate]

After 2 years of programming, I usually found myself using the following design pattern: public interface ISomeInterface { void SomeMethod(); void OtherMethod(); } public abstract class ...
1
vote
1answer
67 views

Efficiently extracting data from pdf with a template system?

basically allow a user to label specific text in a pdf file. Use the label information to create a template, which a script uses to extract text from specific pdf. What would be a good pattern to use ...
7
votes
4answers
1k views

Best Practice: Should error messages be handled by the API or by the App?

I am designing an application that interacts with a RESTful API. When returning error messages like Unable to sign up user Should the error message be generated by the app? or by the API? I am ...
3
votes
4answers
1k views

How to force “program to an interface” without using a java Interface in java 1.6

In java 1.8 they have wonderful new "default interface methods". In 1.6 how close can we come? The goal: use code to keep clients from being able to tell that a class is not a java interface. If we ...
2
votes
4answers
70 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
240 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 ...
1
vote
2answers
173 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
271 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
11k 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
45 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 ...
5
votes
2answers
201 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, ...
3
votes
3answers
113 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. ...
9
votes
4answers
579 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 ...
0
votes
2answers
90 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 ...
-3
votes
1answer
110 views

Java - Concept question: LinkedHashMaps vs POJOs? [on hold]

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
124 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
267 views

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

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
50 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
10k 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 ...
3
votes
2answers
147 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, ...
-4
votes
1answer
89 views

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

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
213 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
244 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
11k 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
171 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 ...
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
687 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
103 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): ...
4
votes
2answers
99 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
346 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 ...
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
164 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
352 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
4k 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
111 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(); ...
2
votes
3answers
218 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 ...
4
votes
1answer
105 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 ...
3
votes
4answers
640 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
309 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 ...
0
votes
2answers
48 views

How can I know if my data needs to be a react.js component?

I'm looking at React.js, and trying to see if it can help me with my recurring sets of data that I have on various pages. All the data is from a database, say a list of names and addresses, a tabular ...
1
vote
1answer
108 views

Is there a valid symbol for “two or more” with Crow's Foot notation?

I have a database design for which one entity of Class A always has at least two entities of Class B. Can I express this with valid Crow's Foot notation? One possible idea I had was this: Excuse ...
2
votes
1answer
202 views

Mental schema for SQL queries [closed]

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 ...
5
votes
5answers
437 views

Training old timey fortran programmers to better code design. hints? [closed]

I need to quickly train Fortran 90 developers into object oriented design, good coding, and general coding practices to make code maintenance easier and accessible to everybody. Their current style is ...
1
vote
0answers
59 views

Improve communication between controller and trackers in a Twitter fetcher tool using RabbitMQ or Apache Flume

I've been working for a time with some researches developing a tool to fetch tweets from Twitter and process them in some way. The first prototype "worked" but became a pain as we used sockets to ...
2
votes
4answers
559 views

Should every front-end developer understand the basic aspects of design?

I'd say that we're developing software in a world where the front-end of an application is probably the most important. The increasing ability for a user to access and interact with software almost ...
1
vote
1answer
52 views

Polymorphism on repository interface for local and remote operations

I'm in the process of designing a facade ApiClient class that would abstract some CRUD operations between a local database and a remote one (through a REST web app). Said ApiClient class depends on 2 ...
1
vote
1answer
1k views

Erlang chat app design?

I have a chat app made in node/socket.io. Scalability factors have made us choose Erlang/Ejabberd/xmpp and it will replace node/socket. I have a few questions: Currently using MySql for chat ...