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

learn more… | top users | synonyms (1)

2
votes
1answer
76 views

A good name for ValueObject that contains database update/create column values [closed]

We all know these fields, database admins so like to add: UserCreated & DateCreated UserUpdated & DateUpdated They need to be displayed in the UI so I want to put them in some ValueObject ...
7
votes
3answers
203 views

In DOM, why is childNodes defined in the Node interface if only some node types can have childNodes?

In DOM, why is childNodes defined in the Node interface if only some node types such as Element, Document and DocumentFragement, can have childNodes? Is this considered a good design? In what cases ...
6
votes
4answers
639 views

What's better either pass a class instance to the method or just primitives? [duplicate]

Let's say I have a model of some data: public class User { public String name; public String password; } And some other class to work with this User: public class ClassB { public ...
5
votes
2answers
1k views

Deduplication of complex records / Similarity Detection

I'm working on a project that involves records with fairly large numbers of fields (~15-20) and I'm trying to figure out a good way to implement deduplication. Essentially the records are people along ...
5
votes
4answers
1k views

Refactoring jQuery spaghetti code to use DDD [closed]

Most of my client side code ends up as a long script in one file the mostly looks like this: <script> function someFunction1(){/*...*/} function someFunction2(){/*...*/} ... var globalVariable1;...
1
vote
1answer
554 views

Task Consumer/Processor architecture

PROBLEM We have various tasks in our system which can take up to 20 minutes. These tasks are generally started from the web interface and run on a new thread. This is obviously a terrible solution ...
8
votes
3answers
701 views

When should you trim input?

I am intern learning tons about the industry outside of academia. One thing I thought about today was trimming input. On one side of the coin I don't want the user/implementer to constantly ...
1
vote
3answers
276 views

How do I support interfaces for different devices in the same input scenario?

I asked this question on SO but someone pointed out that I would be better off here. He's most likely right. So here I go! So I just wanted an opinion. I have 2 different ways to approach the problem....
-1
votes
2answers
234 views

When will be safe to choose Multi-thread design without dead lock? [closed]

Sometime we really need to choose a multi-threaded design, because single-threading will block the UI or block another thread. But sometimes using multiple threads is just one of the choices, for ...
1
vote
3answers
976 views

Coding to interfaces

I understand why it is a good idea to code to an interface rather than to a concrete class. I find it hard to implement though as other methods generally need to use properties of the given object. ...
1
vote
2answers
2k views

Path to learning compiler design [closed]

I'm not sure if this is an acceptable question, but compiler-os-design-where-to-start was, so I figured that I'd take a shot at it. I have taken no formal Computer Science classes. I have programmed ...
5
votes
4answers
1k views

What would the general design for an XSD to C# class converter look like?

I am looking to create a simple code generator to convert XSD definitions to C# classes. This is partly as a learning exercise, but I would also like to get some practical use out of it eventually. ...
1
vote
1answer
197 views

How should I handle two crons that update the database?

I'm working on a Bitcoin-clone block explorer (specifically Mincoin) which has a block timer of about 1 minute. For those unfamiliar with Bitcoin, basically a new data structure called a block is ...
2
votes
1answer
637 views

How do you handle deployment configuration of your thick browser (html/javascript/css) clients?

Question For those of you working with html/javascript/css "thick clients", specifically those that work against some client-independent server API, how do you manage your deployment environment ...
39
votes
12answers
2k views

Documentation in OOP should avoid specifying whether or not a “getter” performs any computation?

My school's CS program avoids any mention of object oriented programming, so I've been doing some reading on my own to supplement it -- specifically, Object Oriented Software Construction by Bertrand ...
1
vote
7answers
679 views

Finally block for methods - is it a bad idea?

The finally block for a try-catch structure is well known, and gives a really easy and elegant way to deal with some must-be-done code. Therefore, I can see no reason why It shouldn't be good for ...
1
vote
1answer
509 views

How to Track File Uploads and Return Upload Status with REST?

The users for our software will want to upload potentially large amounts of files in bulk to our servers. It is then desired that we display the upload status any time the user views the upload screen....
21
votes
10answers
3k views

Is over-engineering a warning sign? [closed]

So we present a straightforward coding exercise to new candidates with some well defined requirements. Occasionally we receive solutions which don't really solve the problem at hand, but are over-...
1
vote
4answers
2k views

How to edit the HTML of an ASP.net site?

Assume that I'm a front-end developer (HTML, CSS) And some one who got their website built using ASP.NET came to me and asked for a new design and I don't know about ASP.NET. Then, how can I change ...
21
votes
3answers
2k views

Does TDD lead to the good design? [duplicate]

I'm in transition from "writing unit tests" state to TDD. I saw as Johannes Brodwall creates quite acceptable design from avoiding any of architecture phase before. I'll ask him soon if it was real ...
3
votes
4answers
335 views

Should We Code for Performance or Stability? [duplicate]

There is a point in time where you make design choices and debate them with management. In my case I have to debate my positions and design choices with senior management but it is frustrating that ...
2
votes
1answer
2k views

How to design a log() method that can easily be accessed from the outside of the Console class?

Recently my team has programmed a custom developer console in a video game which can easily be hidden or displayed, because it's more comfortable and less of a hassle. The Console class contains a ...
1
vote
2answers
208 views

Python — when should a class have-a rather than be-a?

This is related to "Extends is evil" vs. OCP? but separate because the idea of "implement the interface" doesn't exist in Python. I'm writing a class to pull some data off a webpage. It's ...
2
votes
2answers
651 views

Design document for project in C

I have had some experience in documenting the design for project developed in OOP languages. I made classes and used class diagrams to showcase the overall design structure of the implementation when ...
1
vote
1answer
371 views

a lot of small objects - OO pasta [closed]

In the code I am working on, there are a lot of really small objects like: class HasFieldLameSetter { public: HasFieldLameSetter(field& p_):m(_p){} void set(bool p2) ...
4
votes
4answers
254 views

Design: multiple algorithms on the same large data sets

I have several algorithms that I would like to test against the same data sets to compare their results. I don't know how to design it so there is maximum readability and maximum efficiency. I have ...
2
votes
2answers
305 views

What are appropriate metaphors for the pieces of a word processor? [closed]

A word processor is a complicated creature of many layers and pieces, but it represents a relatively simple concept: a piece of paper with writing on it. This leads to the problem of having many ...
36
votes
7answers
3k views

What makes a piece of software an Engine? [closed]

The descriptor 'Engine' gets thrown around a lot: graphics engine, RegEx engine, AI engine, etc. but what actually makes a piece of software an Engine? Design, Input/Output, Purpose, Size?
4
votes
6answers
1k views

How can I improve upon this “pattern”?

I have a series of method calls that all share similar qualities. The basic layout is public void CallDataBase() { Utility sqlHelper = new Utility(); StringBuilder query = new ...
4
votes
4answers
693 views

How can I know when my application is too complex? [closed]

I'm currently working on my own project for an Android app, but then as time goes it feels like my app is concentrating more on another feature than what I had in mind when I first design the app. So ...
2
votes
2answers
292 views

How do I get rid of cyclic references in this design?

I have 3 classes: Meeting, Project and Agenda. A Project contains all sort of information + a list of meetings. The Agenda contains a list of upcoming Meetings. A Meeting contains some data + a list ...
0
votes
0answers
37 views

Program design with multiple data sets, algorithms and results [duplicate]

I have a question regarding the design of my software. The question has already been posted by me at http://stackoverflow.com/questions/18638697/program-design-with-multiple-data-sets-algorithms-and-...
0
votes
2answers
188 views

Utilizing a Java Concurrent Utility from a Web App

I have the following lines of code in my application: return "Service is alive since: " + TimeUnit.MILLISECONDS.toMinutes(mxBean.getUptime()) + " minutes"; It uses the following package: import ...
16
votes
3answers
1k views

How would one go about building pluggable software?

If you have an application of some sort and you want your users to be able to write plugins for it, how should the application be designed? What do you have to take into account, what design ...
2
votes
3answers
892 views

How can I effectively manage long-term feature development and short-term bug fixing at the same time?

We have a huge C, and C++ code base. There is a plan to add a new feature into the existing system, but, this should happen only after 3 to 4 months. So, we are looking for best possible options. ...
2
votes
1answer
181 views

Design of interface for finding one of something or a list

I am developing a telephony call model and thinking about how best to design the interface. One basic idea is that a call has a unique call identifier. I have a list of calls and finding a specific ...
4
votes
3answers
3k views

Creating an entity relationship in REST: May I create the parent by posting to a child id?

We are currently designing a REST API to access classical customer data. One of the elements in the API are the assets of an user. The assets are added under a given service. The backend API will ...
5
votes
3answers
219 views

Where should I place my interface?

I have an interface to communicate with a DB (actually it is not a database, but this is to give a concrete example): interface DbInterface{ Result sendQuery(Query q); } And I am trying to ...
12
votes
2answers
995 views

Design decision - why generate <p> without </p>?

tl;dr Some widely used programs, which generate html, will only generate opening paragraph tags, and not closing ones, assuming that the browser will properly close paragraphs. On the face of it, it ...
27
votes
5answers
18k views

Best practices for using namespaces in C++ [closed]

I have read Uncle Bob's Clean Code a few months ago, and it has had a profound impact on the way I write code. Even if it seemed like he was repeating things that every programmer should know, ...
3
votes
2answers
637 views

What if my nested class extends another class from another package?

I'm in doubts this design is OK, it may be there is a way to do it better? The case is that I need a class which would be used in one and only class and that's it. But, this class needs to inherit ...
-1
votes
5answers
434 views

Beautiful user interface vs. more and more technical features? [closed]

I will understand if you find this is more a discussion than a technical question and if you close the topic (then, where would be an appropriate place to discuss about that? thank you in advance). ...
0
votes
0answers
254 views

Do multiple 'helper' classes conflict with the accepted Apple design scheme?

I have a social location based application and I'm in a bit of design conflict that I can't seem to solve or find good information on. Realizing that I have multiple controllers that will similarly ...
0
votes
2answers
327 views

Best practices for rotating large datasets?

[edit]Turns out there's 1.5 million records... The SQL database is taking about 17-20 seconds to run the query. Would it be best to have Java handle the joins and rearranging in that case? Since this ...
4
votes
2answers
1k views

Logic design question for SQL query

Was wondering if you could help me on a SQL problem I’m having. I have a set of records of events where each event has a start time and end time. No event has the same start time, and the end time ...
10
votes
4answers
995 views

How would I design an interface such that it's clear which properties may change their value, and which will remain constant?

I am having a design issue regarding .NET properties. interface IX { Guid Id { get; } bool IsInvalidated { get; } void Invalidate(); } Problem: This interface has two read-only ...
1
vote
1answer
87 views

Open source development life cycle [duplicate]

I am working as a IT-developer. I am developing J2EE application in our own life project cycle methodology. I have seen and learnt so many SDLC cycle models in order to develop a project but this ...
1
vote
1answer
468 views

Architecting Domain Layer and other modules with dependency injection in mind

I am currently new to Dependency Injection pattern. I am influenced by link by Mark Seemann. I have a confusion regarding whether an interface for an agent class of some agent module should be ...
1
vote
2answers
580 views

C# Logic - gaps & Islands

I am looking for help designing the display of available times for appointments (for example a hairdresser's appointment book). Currently I have a query that returns a collection of periods that are ...
2
votes
2answers
278 views

Programming structural question, controlling lots of states and specific transitions between states case by case

This is a theory question for me just to try and write better code. I am pretty new so hopefully I am using terms like state in the correct way. How I should be thinking about this problem? I am ...