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

learn more… | top users | synonyms (1)

6
votes
2answers
968 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
364 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
386 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 ...
65
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
672 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
312 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 ...
83
votes
10answers
10k 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 ...
4
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
871 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
565 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
721 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
166 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
182 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
400 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
745 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!!
1
vote
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 ...
2
votes
1answer
217 views

Form Follows Function in Programming?

Does the saying, "form follows function" hold true in programming or language-design? Why or why not?
2
votes
1answer
211 views

Composite-like pattern and SRP violation

Recently I've noticed myself implementing pattern similar to the one described below. Starting with interface: public interface IUserProvider { User GetUser(UserData data); } GetUser method's ...
2
votes
1answer
168 views

What are the design decisions involved in choosing how to expose a Java web application?

There are many ways to expose a Java web application to the consumer: application container (JBoss etc), servlet container (Tomcat etc), OSGi (Knopflerfish etc), self-executable WAR (Winstone etc) and ...
6
votes
3answers
889 views

Checking preconditions or not

I've been wanting to find a solid answer to the question of whether or not to have runtime checks to validate input for the purposes of ensuring a client has stuck to their end of the agreement in ...
4
votes
5answers
221 views

Group method parameter or individual parameter?

I would like to ask on method parameters design consideration. I am usually deciding between using individual variables as parameters versus grouping them to a class or dictionary as one parameter. ...
1
vote
5answers
1k views

Visual Basic link to SQL output to Word

I am in need of some advice/references. I am currently trying to develop a legal document interface. There are certain fields in which I need to query out of my sql db and have those fields output ...
2
votes
1answer
162 views

Separating model from UI

I have a Swing application with a custom TreeModel that can refer to domain instances. I'm wondering what changes I could make if I consider moving to a web interface later on. Would a pluggable model ...
4
votes
2answers
160 views

Deprecated Methods in Code Base

A lot of the code I've been working on recently, both professionally (read: at work) and in other spheres (read: at home, for friends/family/etc, or NOT FOR WORK), has been worked on, redesigned and ...
8
votes
5answers
2k views

Any Practical Alternative to the Signals + Slots model for GUI Programming?

The majority of GUI Toolkits nowadays use the Signals + Slots model. It was Qt and GTK+, if I am not wrong, who pioneered it. You know, the widgets or graphical objects (sometimes even ones that ...
3
votes
3answers
1k views

Where to start a software Analysis & Designing? [closed]

I am starting a big database-oriented software project to develop. I have full picture of the software in mind. I need to do the designing using UML. As there are various tools in UML such as usecase, ...
9
votes
1answer
1k views

How to refactor a Python “god class”?

Problem I’m working on a Python project whose main class is a bit “God Object”. There are so friggin’ many attributes and methods! I want to refactor the class. So Far… For the first step, I ...
7
votes
1answer
204 views

How important is index size when searching?

My company has recently began using Apache Solr to search its data. As we learn how to use it we have gone down the path of indexing multiple fields to get the results we need. Most of these are ...
1
vote
2answers
642 views

SQL DB design to support user feeds (in application like facebook)

I have a social network server with a MySql DB. I want to show the users feeds like done in Facebook. Example - UserX now Friend with userY, userX did like on postX etc. Currently I have table: C1 : ...
4
votes
7answers
1k views

How to improve designer and developer work flow?

I work in a small startup with two front end developers and one designer. Currently the process starts with the designer sending a png file with the whole page design and assets if needed. My task as ...
6
votes
6answers
3k views

What is the simplest human readable configuration file format? [closed]

Current configuration file is as follows: mainwindow.title = 'test' mainwindow.position.x = 100 mainwindow.position.y = 200 mainwindow.button.label = 'apply' mainwindow.button.size.x = 100 ...
11
votes
4answers
420 views

Visually and audibly unambiguous subset of the Latin alphabet?

Imagine you give someone a card with the code "5SBDO0" on it. In some fonts, the letter "S" is difficult to visually distinguish from the number five, (as with number zero and letter "O"). Reading ...
3
votes
3answers
206 views

Actor based concurrency and cancellation

I'm reading about actor based concurrency and I appreciate the simplicity of actors sequentially processing messages on a single thread. However there is one scenario that doesn't seen possible. ...
3
votes
1answer
1k views

Creating a shared library that might be used with desktop applications and web projects

I have been involved in a number of MVC.NET and c# desktop projects in our company over the last year or so while also managing to kept my nose poked into other projects (in a read-only learning ...
0
votes
2answers
243 views

Should Business Interfaces be part of the Model layer?

In an oriented-services enterprise application, isn't it an antipattern to mix Service APIs (containing interface that external users depends on) with Model objects (entities, custom exceptions ...
0
votes
2answers
335 views

how should I design Objects around this business requirement?

This is the business requirement: " A Holiday Package (e.g. New York NY Holiday Package) can be offered in different ways based on the Origin city: From New Delhi to NY From Bombay to NY NY itself ...
-2
votes
3answers
244 views

Is it a good approach to rely on 3rd party software ( not library )?

We have program( written in VB ) using a call to a winzip program or 7zip command line tool to zip some files. Once I accidentally uninstall the winzip on my computer and making one of our program( ...
0
votes
1answer
3k views

Implementing a ILogger interface to log data

I have a need to write data to file in one of my classes. Obviously I will pass an interface into my class to decouple it. I was thinking this interface will be used for testing and also in other ...
3
votes
5answers
597 views

Is this kind of Design by Contract useless?

I've just started informatics university and I'm attending a programming course about C(++). The programming professor prefers to connect every topic with a type of programming design that is similar ...
17
votes
5answers
1k views

Do ORMs enable the creation of rich domain models?

After using Hibernate on most of my projects for about 8 years, I've landed on a company that discourages its use and wants applications to only interact with the DB through stored procedures. After ...