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

learn more… | top users | synonyms (1)

0
votes
2answers
129 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 ...
3
votes
2answers
83 views

Design help with parallel process

I am re-factoring some code and an having an issue with retrieving data from two parallel processes. I have an application that sends packets back and forth via different mediums (ex: RS232, TCP/IP, ...
2
votes
4answers
212 views

Good design for class with similar constructors

I was reading this question and thought that good points were made, but most of the solutions involved renaming one of the methods. I am refactoring some poorly written code and I've run into this ...
2
votes
2answers
286 views

Creating Objects

I have a general coding standard question. Is it bad practice to initialize and create an object in multiple methods depending on the outcome of a users choice. So for example if the user quits a ...
4
votes
3answers
714 views

When too much encapsulation was reached

Recently, I read a lot of good articles about how to do good encapsulation. And when I say "good encapsulation", I am not talking about hiding private fields with public properties; I am talking about ...
5
votes
3answers
305 views

When module calling gets ugly

Has this ever happened to you? You've got a suite of well designed, single-responsibility modules, covered by unit tests. In any higher-level function you code, you are (95% of the code) simply ...
3
votes
1answer
209 views

Question about a simple design problem

At work I stumbled uppon a method. It made a query, and returned a String based on the result of the query, such as de ID of a customer. If the query didn't return a single customer, it'd return a ...
3
votes
5answers
418 views

returning null vs returning zero, which would be better?

I inherited a project that I am managing and having to maintain pending the redevelopment of the code base. At the moment I am being tasked with adding little features all over the place and have ...
4
votes
3answers
390 views

Create many similar classes, or just one

The goal is to create an application that has objects that can represent some operations (add, subtract, etc). All of those objects will have common functions and members, and thus will either ...
2
votes
2answers
678 views

Web workflow solution - how should I approach the design?

We've been tasked with creating a web based workflow tool to track change management. It has a single workflow with multiple synchronous tasks for the most part, but branch out at a point to tasks ...
0
votes
1answer
189 views

Need a file location in Business logic layer from UI layer

Here's what I'm doing: I am reading a file in BLL, which is sitting in the UI layer. Currently the application is using HttpContext.Current.Request.PhysicalApplicationPath to find the absolute path ...
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 ...
2
votes
2answers
193 views

Design: Sharing a class between multiple forms

This question relates to a question I asked earlier, which can be used for reference here: Is this the best way to approach this design? Is this an example of MVC? While coding, I came across a ...
8
votes
5answers
349 views

Ways to version user generated documents

I have an online document which essentially gets stored to the database as XML string. I'm thinking about a way to implement versioning of the document for the user. So that user can go back to ...
2
votes
1answer
124 views

Is this the best way to approach this design? Is this an example of MVC?

I am designing a WinForms application in C# and wanted to get a design check by you guys. I am fairly new to programming and have been reading some material, so please excuse my mis-usage of words or ...
9
votes
7answers
927 views

How do professional software development teams deal with design complexity in non-trivial projects?

First, I realize this question may by somewhat long and vague and I apologize for this. This is probably a basic problem with a short name to anybody who's "got it", but as I find myself lacking in ...
4
votes
2answers
778 views

Who should register input listeners: the controller or the view? (MVC)

I'm using an (C++) SDK (Marmalade) and building a project around the MVC pattern. On my app, user input listeners may be registered on certain UI elements/widgets/etc providing a proper callback ...
11
votes
4answers
8k views

On MVC can several views have the same controller or one view must have one unique controller?

I'm having some questions while designing a architecture for a project around MVC. (It's a C++/Marmalade SDK project, I'm not using any particular MVC framework, I'm making one.) On several articles ...
9
votes
6answers
971 views

Interpretation of DRY principle

Right now I'm struggling with this concept of DRY (Don't Repeat Yourself) in my coding. I'm creating this function in which I'm fearing it's becoming too complex but I'm trying to follow the DRY ...
1
vote
3answers
390 views

Is this an example of a pattern or an algorithm?

I feel like I have a reusable "something" here and I'm not sure whether to think of it as a pattern or an algorithm (or neither). It's characterized by having an unknown amount of work to accomplish ...
1
vote
2answers
516 views

How to make a recurring event? Such as an entry in a agenda

I have an entity (model) called Notification, shown to Users of the system. So far, Notifications were created and showed instantly to users when they were enabled, and hidden when disabled or ...
1
vote
2answers
73 views

Should Multiple Data Items be in Multi Unit Test Methods?

I often want to have the same unit test applied to data multiple items that are roughly equivalent (two non-empty strings). Currently I implement these in multiple unit test methods, with names like ...
6
votes
8answers
850 views

Should a class without instance variables be considered a class?

Say you need to implement a few closely related functions that provide a piece of functionality, but there is no need to track any state between those functions, they just sometimes pass some ...
4
votes
2answers
238 views

Design a program and methods of doing so

I'm working on becoming a self-taught programmer. I've read a little bit through a lot of languages and I decided to start with Java and have been using it for several months now. I didn't have much ...
6
votes
2answers
1k views

designing large scale applications in a low level language

I have been learning C for a while but still get confused about designing large programs within C (a large application such as the Linux kernel). Moving from Java where you have classes it's ...
3
votes
3answers
366 views

What is meaning of a HINT when used in software engineering?

I've seen this now in a number of places and a number of contexts, for example in SQL. I cannot define the meaning of a "Hint" which it seems clear has some application as or part of a larger design ...
1
vote
2answers
388 views

initial Class design: access modifiers and no-arg constructors

Context: Student working through Class design in personal/side project for Summer. I've never written anything implemented by others or had to maintain code. Trying to maximize encapsulation and ...
66
votes
16answers
15k views

Is it wrong to use a boolean parameter to determine behavior?

I have seen a practice from time to time that "feels" wrong, but I can't quite articulate what is wrong about it. Or maybe it's just my prejudice. Here goes: A developer defines a method with a ...
9
votes
5answers
689 views

OOP :What are some of the situations in which class based design is better than interface based one?

I was reading JDOM's website. Why is the JDOM API defined in terms of concrete classes rather than interfaces? Jason Hunter summarizes the arguments against an interface-based API for JDOM: ...
2
votes
2answers
317 views

Replacing dao layer

I am developing a series of webservices (based on spring and spring mvc). For the first time in my dev career I do plan on replacing the dao layer in the future(I have always seen it mentioned but ...
6
votes
6answers
2k views

Best way to parse a file

I'm trying to find a better solution for making a parser to some of the famous file formats out there such as: EDIFACT and TRADACOMS. If you aren't familiar with these standards then check out this ...
8
votes
3answers
1k views

“how bad” is unrelated code in try-catch-finally block?

This is a related Q: Is use of finally clause for doing work after return bad style/dangerous? In the referenced Q, the finally code is related to the structure used and the necessity of ...
87
votes
11answers
11k views

The modern way to perform error handling…

I've been pondering this problem for a while now and find myself continually finding caveats and contradictions, so I'm hoping someone can produce a conclusion to the following: Favour exceptions ...
5
votes
1answer
2k views

How can I express recursive composition in UML class diagrams?

I have one class called "Institution" which represents a public institution (with properties like id_inst, name_inst, tel_inst, fax_inst...). The institution can have affiliated institutions, for ...
6
votes
6answers
2k views

Can the Strategy pattern be implemented without significant branching?

The Strategy pattern works well to avoid huge if...else constructs and make it easier to add or replace functionality. However, it still leaves one flaw in my opinion. It seems like in every ...
8
votes
4answers
891 views

Design pattern for handling a response

Most of the time when I'm writing some code that handles the response for a certain function call I get the following code structure: example: This is a function that will handle the authentication ...
3
votes
9answers
579 views

Standardized Data Structure Interface

I want to work with a variety of data structures (arrays, singly/doubly linked lists, sorted structures, etc.) on a plug-and-play basis. For example, I want to be able to easily swap in and out the ...
22
votes
2answers
12k views

When to use Advanced Message Queuing Protocol like RabbitMQ? [closed]

Can somebody explain me in what use-cases I should consider using AMQP like e.g. RabbitMQ? What are the pros and cons?
6
votes
8answers
725 views

Should software developers be skilled at software design?

There is an analysis and design phase of the software development life cycle. Should software developers be skilled enough for carrying out the work performed during this phase, such as drawing ...
1
vote
2answers
169 views

Rotate, Scale and Transform in video games

IF a 3 dot vector and a 3x3 matrix can rotate, scale and transform things in a virtual 3D space, could you use a 3x3x3 matrix and a 3.3.3 vector to do something to the games sense of time?
5
votes
3answers
196 views

When is 'cloning', rather than reusing, a module acceptable design solution?

For this question, I'll give an example module to facilitate the discussion, Let's say the module is a calculation engine, It currently servers its purpose for its current audience. The requirement is ...
2
votes
3answers
206 views

How can I be an agent of change amongst old coders? [closed]

I have been developing software for over 12 years now. I keep high standards when designing code from database normalization, to OOP, to learning and implementing the model view model pattern. Through ...
1
vote
2answers
307 views

Django development best practices

I have spent some time studying Django and I've done some applications. But I really don't know what is the best approach while developing an application, I mean, there are several options: Make all ...
10
votes
1answer
2k views

Is there a need for a factory class for creating viewmodels?

A colleague of mine suggested using a factory class for creating viewmodel objects in our ASP.NET MVC solutions. The idea being that it can help with the design, and maintainability, of the way ...
3
votes
2answers
183 views

optimizing webapp workflow

I have a debug and a live server running a LAMP setup with some python scripts. By now I'm working with eclipse and Expandrive (via SSH) on the debug server. Whenever I want to release new code on the ...
7
votes
6answers
402 views

Don't structure data all the way down

In the blog post Don't structure data all the way down, the author discusses different ways to structure a circle datatype and how to implement the parameters to a Radius function. area({circle, ...
3
votes
3answers
773 views

Patterns for Handling Changing Property Sets in C++

I have a bunch "Property Sets" (which are simple structs containing POD members). I'd like to modify these property sets (eg: add a new member) at run time so that the definition of the property sets ...
4
votes
2answers
8k views

Real life examples of P, NP, NP hard ,NP Complete problems [closed]

I need to know the real life or real time examples of above mentioned problems thanks!!
2
votes
2answers
1k views

Designing complex query builders in java/jpa/hibernate

I need to build complex sql queries programatically, based on large filter conditions. For example, below are few sample/hypothitical filter conditions, based on which i need to fetch users Country: ...
3
votes
3answers
1k views

Designing an API on top with Java RMI and Rest APIs

I'm working on the backend of a java web application. We have a document repository (Fedora Commons specifically) where we house xml files. I want to abstract the API of the repository internally so ...