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

learn more… | top users | synonyms (1)

3
votes
1answer
57 views

How to organize predefined queries with Entity Framework?

I have some queries that I use all the time (like get rows only of some specific type, or count something etc.). I'd like to organize them somehow (better then I currently do). Currently I have them ...
2
votes
1answer
63 views

Design, how to utilize The Hardware (multiple threads and/or GPU) while indexing (via a database) a very large set of binary files

Problem How can design my file parser to maximize the hardware when processing (creating meta data for) a large file (i.e. how to avoid being blocked by IO and running out of memory) preferably ...
-2
votes
0answers
22 views

Developing a web app interfacing with Gmail [on hold]

readers. I'm a guy relatively new to programming (I mainly code really basic HTML and fool around with Linux environments) and have something I'd really like to do. Say, for example, that I have an ...
0
votes
0answers
19 views

Content delivery design

I'm designing a system where users can access files stored in an external content storage service such as AWS's S3. Here's a simple diagram: ------ ------------ ----------------- | User ...
2
votes
5answers
244 views

Why use a bool over more domain specific abstractions

Booleans are often used to model domain specific dichotomies. The most common example I can think of is the success or failure of an operation. It seems to me that a boolean must be interpreted in the ...
1
vote
1answer
58 views

Nested REST urls and parent id, which is better design?

Okay, we have two resources: Album and Song. Here is API: GET,POST /albums GET,POST /albums/:albumId GET,POST /albums/:albumId/songs GET,POST /albums/:albumId/songs/:songId We know that we hate ...
0
votes
0answers
29 views

What architecture/design to adopt when consuming a RESTful API? (iOS App)

TL;DR 1) I want to refactor the biggest part of the app on which I work - and it is pretty much spaghetti. It's a single class that makes the requests to the server, parses the JSON and saves the ...
0
votes
2answers
44 views

What are some ways to get application settings from users into class objects that also follow proper design principles? [on hold]

I'm really confused how to enable the user to apply application settings for an application they are using (that get consumed by to a class object) AND the method I need to use to get the settings ...
4
votes
3answers
77 views

Sets of pair parameters

I have the following class, this class like many rely one parameters coming in as a pair. Originally for convenience, I set them as params Object[] values and check if there is an even number of them ...
0
votes
0answers
25 views

Product Development Design - Customer specific changes [duplicate]

We are developing a web based product that will require customization for various customers. Customers tend to have different rules and nomenclatures, hence the customization requirement. The ...
1
vote
3answers
171 views

How to make one test depend on the results of another test?

Let's say there is a utility class that provides some common static methods used everywhere in your code by many other classes. How would you design your unit tests for the consumers of the utility ...
1
vote
1answer
120 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 ...
0
votes
0answers
28 views

Best Practices for Managing Low Disc Space [closed]

What are the norms for managing a low disc space situation? i.e. what should my application do if there is low disc space on startup? What would an application normally do if it runs out of space ...
-3
votes
0answers
38 views

Initiating to Implement a New Idea [closed]

I have a new idea, which I think in a way would work well, I have been working as a Java Developer since past few years, I also have a good knowledge on design patterns and data structures which are ...
23
votes
6answers
3k views

When NOT to apply Dependency Inversion?

I am currently trying to figure out SOLID. So Dependency inversion means that any two classes should communicate via interfaces, not directly. E.g. if class A has a method, that expects a pointer to ...
0
votes
0answers
47 views

Should all public API POCO value-type properties be nullables?

I use nullable value types a lot when designing classes that have properties which may remain null, i.e. when the object is being persisted. For example: public int? MyProperty { get; set; } My ...
0
votes
2answers
105 views

Should a “secret access code” use the same security as a normal password? [closed]

Obviously, when you store a password, you should use something similar to bcrypt before you store it in in the database. But I have a client who wants to add the ability to add a "secret code" to ...
2
votes
1answer
99 views

Many small requests vs. few large requests (API Design)

I'm currently working on a project with an organization as follows: Client - Gets data from the main server via REST api. Server - Requests data from various other servers via third-party APIs ...
2
votes
2answers
79 views

Free Standing Functions in Global Namespace

When writing non-member, free functions, can they be placed in the global namespace so long as the signature specifies a namespace-scoped object? For example, in the code below, is "Example 2" ...
0
votes
0answers
23 views

How to implement a Web UI feature to insert default scentences in an textarea [migrated]

We are talking about implementing a system that easily generates sales reports for our salesemployees. We want to create a webapplication with one or maybe more textarea's to gather the inputdata from ...
30
votes
10answers
6k views

Is it reasonable to assume that any physical quantity can be represented by a 64-bit integer without overflow or underflow?

The original binary search algorithm in the JDK used 32-bit integers and had an overflow bug if (low + high) > INT_MAX ...
-2
votes
0answers
39 views

Designing OOD for Secure User Login with Securely keeping session [closed]

I am planning to design a module from my project which is having let User login securely and keep the session alive securely on a machine accepted by user as frequently used machine. I have identified ...
0
votes
0answers
39 views

What classes should be part of Business Logic Layer? [closed]

I am very new to software architecture.I am developing an iPhone app. I have read that iOS follows MVC architecture, but one of my previous projects had busies logic layer, helper folder too in its ...
1
vote
2answers
99 views

Caveats of using String.hashCode() on a switch on java < 1.7

There are several cases when I want to switch over a String input. I decided for implementing something like: public Object doStuff(String param) { switch (param.hashCode()) { case 1234546: ...
-2
votes
0answers
48 views

Programming thought experiments [closed]

I hope this question is allowed here, if not please delete or move! Last year a colleague mentioned the 'Two Generals' thought experiment to me which has stuck in my mind ever since, especially as I ...
2
votes
5answers
254 views

Is it bad or good to wrap mutable objects in immutable containers?

If I have parts of code that need to mutate the underlying data structure but then others that consume, not mutate the structure, is it good practice to create a wrapper which does not expose mutation ...
0
votes
2answers
84 views

How is a dictionary better than a big switch, when mapping data to action? [duplicate]

Often times we see stuff like that in code: void myFunction(string someValue) { if (someValue == "a") { // ... } else if (someValue == "b") { // ... } else if (someValue == ...
0
votes
1answer
36 views

Separate Drawable objects and their Data

I am looking for a way to design my application. Suppose you had a car drawing thing. Car has multiple parts.Some are going to be visible some are not.For example battery should be drawn. So someone ...
2
votes
1answer
57 views

timed events to modulation of real-time audio

I am new very to audio programming and am having trouble figuring out the right kind of algorithm for converting control events (e.g. like MIDI) to real-time sound genesis with a buffer. At the ...
1
vote
2answers
37 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 ...
0
votes
1answer
36 views

Project type for a matching application to run on schedule [closed]

I am about to start work on a new project, and I am looking for some advice on what approach I should take in terms of what kind of project it should be. Basic overview of requirements The system is ...
4
votes
1answer
190 views

Should I avoid data duplication?

I'm trying to design a relatively simple ERP system. However, there are some requirements that complicate things a little bit: It must be possible to add all sorts of contacts to the people table, ...
2
votes
2answers
91 views

Typedefs to convey relations between classes

I'm wondering if the following use of typedefs is any good practice, or if there are any downsides to it. Basically I have alot of "data"-structs, which are intended to be used in (globally unique) ...
0
votes
1answer
121 views

Would adding more digits be a way to scale a order generation service? [closed]

I am working on interview questions from Amazon.com Software Development Engineer Intern Interview Questions. One of the interviewees was asked "give a scalable system design of Amazon.com's order ...
0
votes
1answer
128 views

Get inspired by real world objects and their interactions [closed]

Based on this question I think while the aim of OOP is not necessarily to copy real world objects, they could be source of inspiration to design a software or solve a problem or even learn the OOP ...
1
vote
4answers
154 views

Making an automotive system more 'modular' in terms of software?

I am working on an automotive project that we are supposed to make more modular. I am a software guy and I have very little knowledge of automotive hardware.I dont have any requirements or details ...
0
votes
0answers
32 views

what is the best method to return db query and additional information from other methods

I am new to MVC and trying to continue to learn base on best practices. I am trying to return data from multiple sources -- one source being a mysql db query and another source from another method ...
3
votes
1answer
132 views

Event sourcing and REST

I came across Event Sourcing design and I would like to use in an application where a REST client is needed (RESTful to be precise). However I fail to connect these together as REST is quite CRUD-like ...
1
vote
2answers
174 views

Is it possible to avoid SQL injection by not using a Query Language for most tasks? [duplicate]

I'm coming at this from a somewhat beginners viewpoint so if this is an obvious question it's because I didn't know the right terms to search for. Are there DBMS's that provide an alternative ...
2
votes
4answers
276 views

How To Avoid Dependencies between Modules

We have two modules, lets call them U and F. Module U has entities like that: class Upload { Long id; User uploadedBy; Date uploadedAt; } Module F has entities like that: class Field ...
3
votes
1answer
250 views

How would one go about creating a “Licence Key” for a distributable source-available Software project?

This is something I have wondered, it has been a while since I have seen anything you can download which has to connect to license server in order to monetize a piece of software (and the last time I ...
1
vote
2answers
121 views

Which design (pattern) would be suitable to abstract logging platforms?

I need to create a simple system to abstract logging platforms. The idea is that I'd like to be able to exchange or activate a logging platform (nlog, log4net, enterprise library) via some ...
0
votes
0answers
49 views

Help design this data import program

I want to import some data from various locations and pump it into MongoDb and some cloud services. The data starts off as JSON, I read that JSON, create some objects in mongo, go to the next level ...
0
votes
1answer
51 views

Design caching system

I am thinking about making my own caching system, mainly for C#, but this is more a design question, so the language doesn't really matter. Let me start at the beginning, I have a basic web api, ...
0
votes
2answers
31 views

Making sure loaden (non default) config is valid

I'm writing a device Software in which the device must handle much data. Therefore it has a database, either on NV-Ram (Non-volatile memory) or a SD-Card. Due there's a DB which I can use, I also use ...
0
votes
2answers
102 views

Organizing C++ Components [closed]

In my current company we've brought the discussion about how to organize most of our different C++ components considering the following requirements: There might be interdependencies between ...
0
votes
0answers
39 views

How to profile and compare two client-side approaches? [closed]

I'm facing a project in which presumably large datasets will be interactively visualized client-side. These datasets' sizes vary, both in number of rows and number of columns. The visualizations and ...
0
votes
2answers
299 views

REST API - Should API Return Nested JSON Objects?

When it comes to JSON APIs is it good practice to flatten out responses and avoid nested JSON objects? As an example lets say we have an API similar to IMDb but for video games. There are a couple ...
0
votes
1answer
68 views

Should I prefer classes or singletons in JavaScript/Node?

This question applies especially to Node.js, but also to JavaScript in general. I started working on a simple web app in Node.js. I'm relatively new to Node and JavaScript, and come mainly from C# ...
15
votes
3answers
1k views

How much detail to put into first iteration of project?

I have just started a new personal project (Python), and am writing what amounts to a "rough draft" of the program, the minimum required to do what I want to do. I am not yet putting in extensive ...