Questions about problem solving and planning for a solution through software design.
19
votes
5answers
1k views
Should I use Dependency Injection or static factories?
When designing a system I am often faced with the problem of having a bunch of modules (logging, database acces, etc) being used by the other modules. The question is, how do I go about providing ...
11
votes
3answers
3k views
How do I set up MVP for a Winforms solution?
Question moved from Stackoverflow - http://stackoverflow.com/questions/4971048/how-do-i-set-up-mvp-for-a-winforms-solution
I have used MVP and MVC in the past, and I prefer MVP as it controls the ...
26
votes
24answers
4k views
Absolute statements in IT that are wrong [closed]
I was recently in a discussion about the absolute statement "It costs more in programming time to optimise software than it costs to throw hardware at a problem".
The general thought (of which I ...
15
votes
4answers
1k views
Solid principles vs YAGNI
When do the SOLID principles become YAGNI?
As programmers we make trade-offs all the time, between complexity, maintainability, time to build and so forth. Amongst others, two of the smartest ...
9
votes
5answers
692 views
Good at Backend, but bad at front end
I want to start web development, I have been learning php.
I have experience in Java, Python, and C++
This experience has made me good at the back end side of web development.
But I am terrible at ...
8
votes
1answer
310 views
When is a glue or management class doing too much?
I'm prone to building centralized classes that manage the other classes in my designs. It doesn't store everything itself, but most data requests would go to the "manager" first. While looking at an ...
15
votes
8answers
5k views
What software can be used to create architecture diagrams?
I use MS Visio for most of my design/architecting work when I need to be able to save the diagram somewhere and edit it later. I'm not the biggest fan of Visio, but it gets the job done (and it's free ...
11
votes
6answers
546 views
Development Approach: User Interface In or Domain Model Out?
While I've never delivered anything using Smalltalk, my brief time playing with it has definitely left its mark. The only way to describe the experience is MVC the way it was meant to be. ...
10
votes
5answers
5k views
Fastest way to document software architecture and design
We are a small team of 5 developers and I'm looking for some great advices about how to document the software architecture and design. I'm going for the sweet spot, where the time invested pays off. I ...
8
votes
4answers
1k views
How did you get good practices for your OOP designs?
I realized I have a difficulty creating OOP designs. I spent many time deciding if this property is correctly set it to X class.
For example, this is a post which has a few days: ...
27
votes
12answers
1k views
Develop fast and buggy, then correct errors or be slow, careful for each line of code? [duplicate]
Possible Duplicates:
Frankly, do you prefer Cowboy coding?
Prototyping vs. Clean Code at the early stages
Good design: How much hackyness is acceptable?
Does craftsmanship pay off?
...
24
votes
8answers
2k views
Can manager classes be a sign of bad architecture?
Lately I've begun to think that having lots of manager classes in your design is a bad thing. The idea hasn't matured enough for me to make a compelling argument, but here's a few general points:
I ...
23
votes
6answers
912 views
Object Oriented “normalization”
In database programming there's a technique called "normalization" that you do to data you want to store.
Has anyone tried to apply this concept to object design? How did you? How did it work out?
...
17
votes
7answers
846 views
S.O.L.I.D., avoiding anemic domains, dependency injection?
Although this could be a programming language agnostic question, I'm interested in answers targeting the .NET ecosystem.
This is the scenario: suppose we need to develop a simple console application ...
16
votes
4answers
1k views
Architectural differences between dynamic and static languages
Area there any major architectural differences when designing applications that will be built on static languages (such as C# or Java) and dynamic languages (such as Ruby or Python)? Wich are the ...
14
votes
9answers
946 views
We're not a software company. Is a complete re-write still a bad idea?
I understand the reasoning behind Joel Spolsky's article "Things You Should Never Do, Part I", but I always see it referenced in regards in situations where the end goal is the production of software. ...
8
votes
6answers
2k views
Pros and Cons of holding all the business logic in stored procedures in web application [duplicate]
In some organization I worked for web applications are developed basing all the business logic in Database stored procedures. For example, use html for view and servlet as controllers to divert the ...
4
votes
8answers
4k views
Constructor should generally not call methods
I described to a colleague why a constructor calling a method can be an antipattern.
example (in my rusty C++)
class C {
public :
C(int foo);
void setFoo(int foo);
private:
int foo;
}
...
3
votes
2answers
5k views
ASP.NET MVC 3 (C#) Software Architecture
I am starting on a relatively large and ambitious ASP.NET MVC 3 project and just thinking about the best way to organize my code. The project is basically going to be a general management system that ...
20
votes
18answers
694 views
What do you optimize for?
Generally speaking, what type of optimizations do you typically slant yourself towards when designing software?
Are you the type that prefers to optimize your design for
Development time (i.e., ...
12
votes
4answers
1k views
Is It “Wrong”/Bad Design To Put A Thread/Background Worker In A Class?
I have a class that will read from Excel (C# and .Net 4) and in that class I have a background worker that will load the data from Excel while the UI can remain responsive. My question is as follows: ...
2
votes
1answer
281 views
Where do I start to learn systems analysis?
Though I learned Systems Analysis in college, I feel like I am out of date. All I really remember is certain aspects of the SDLC which I realize is a little passé. I've been on the implementation end ...
40
votes
4answers
4k views
What is inversion of control, and when should I use it?
I am designing a new system and I want to know what inversion of control (IOC) is, and more importantly, when to use it.
Does it have to be implemented with interfaces or can be done with classes?
19
votes
12answers
1k views
How To Deal With Terrible Design Decisions
I'm a consultant at one company. There is another consultant who is a year older than me and has been here 3 months longer than I have, and a full time developer.
The full-time developer is great. ...
13
votes
4answers
1k views
What is the good explanation of Tennent's Correspondence Principle?
I found myself struggling to see what is this principle about and why is it so important for language design.
Basically, it states, that for every expression expr in language should be exactly the ...
13
votes
7answers
185 views
What optimizations are premature? [duplicate]
I've been here for nearly a month and it seems that people have a tendency to be eager to use the "Premature Optimization is the root of all evil" argument as soon as someone mentions efficiency.
...
12
votes
13answers
280 views
Design for future changes or solve the problem at hand
While writing the code or during design do you try to generalize the problem at the first instance itself or try to solve that very specific problem. I am asking this because, trying to generalize the ...
10
votes
1answer
193 views
Drawing thread interaction
I'd like to draw (pen and pencils) threads interaction in a UML(-like) notation. I don't insist on UML, anything that is obvious to the reader should do.
I started with sequence diagrams, but I don't ...
10
votes
3answers
306 views
How do you conquer the challenge of designing for large screen real-estate?
This question is a bit more subjective, but I'm hoping to get some new perspective. I'm so used to designing for a certain screen size (typically 1024x768) that I find that size to not be a problem. ...
8
votes
3answers
367 views
Should we rename overloaded methods?
Assume an interface containing these methods :
Car find(long id);
List<Car> find(String model);
Is it better to rename them like this?
Car findById(long id);
List findByModel(String ...
6
votes
3answers
341 views
How can I get better at explaining complex software processes to developers?
I'm really struggling with my software specs. I am not a professional programmer but enjoy doing it for fun and made some software that I want to sell later but I'm not happy with the code quality. ...
6
votes
4answers
245 views
Communications regarding maintainability of code
I'm in search of good language or metaphors to discuss the maintainability of code with non-technical folks (PMs, business sponsors &c).
In particular, I've recently created a few one-off, ...
1
vote
5answers
396 views
Design Methodology for Developing Interoperable Systems?
A bit of background
The company I work for has been creating database applications since around 1980 and, until relatively recently, most of these systems have been stand-alone "silo" systems.
...
10
votes
4answers
358 views
Code duplication with no obvious abstraction
Have you ever encountered a case of code duplication where, upon looking at the lines of code, you couldn't fit a thematic abstraction to it that faithfully describes its role in the logic? And what ...
9
votes
2answers
466 views
Is it better to have separate Create and Edit actions or combine Create and Edit into one?
We are using ASP.NET MVC 2 with a Controller/View Presentation Layer and Model consisting of A Business Logic Layer, Data Access Layer [Stored Procedures and classes/methods to talk to the stored ...
7
votes
2answers
245 views
What is the preferred method for an application to get settings which should not be stored in version control?
Let's say an application I'm writing requires a password for something but I don't want that password to be saved in version control (so no hard-coding the password). What I've been doing is creating ...
2
votes
7answers
554 views
How can I get started on my first non-trivially sized Java project? [closed]
In a month, I have to hand in a Java project. I have to make an e-shop program which has two types of users (admin and normal users). The admin can add/delete/restock stuff in the shop while the ...
2
votes
1answer
185 views
How should I structure our common modules to maximize reuse and reduce duplication? [duplicate]
Currently I'm working at a .NET project-based company. Our coding is not modularized, mostly we are copy/pasting old code that is needed on a new project and modify it.
I was trying to standardize ...
2
votes
3answers
431 views
Embedded Web Server Vs External Web Server
So I've thought of creating a web application in either Lisp or another functional language and was thinking of embedding the web server into the application (have my application handle the HTTP ...
2
votes
2answers
338 views
PyQt design issues
I've been working on a my first real project using PyQt lately. I've done just a little bit of work in Qt for C++ but nothing more than just messing around. I've found that the Qt python bindings are ...
0
votes
2answers
835 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 = ...
14
votes
14answers
1k views
Is it common to prototype in a higher level language?
I'm currently toying with the idea of embarking on a project that far exceeds my current programming ability in a language I have very little real world experience in (C). Would it be valuable to ...
9
votes
6answers
2k views
Are Java's public fields just a tragic historical design flaw at this point?
It seems to be Java orthodoxy at this point that one should basically never use public fields for object state. (I don't necessarily agree, but that's not relevant to my question.) Given that, would ...
6
votes
7answers
217 views
Should we write detailed architecture design or just an outline when designing a program?
When I'm doing design for a task, I keep fighting this nagging feeling that aside from being a general outline it's going to be more or less ignored in the end. I'll give you an example:
I was ...
6
votes
1answer
398 views
1-click software release
I am rewriting a vb6 installer into NSIS. One of my priorities is to compile-to-release in the least number of steps possible; ideally, a one click process, in which all needed files are included, ...
6
votes
2answers
263 views
How can a programmer work effectively with a remote web designer
I'm a programmer who understand html & css, but got no taste.
My company decided to redesign our e-commerce website with new UI and move to ASP.Net MVC.
They want a really good design, so they ...
3
votes
1answer
225 views
Is it correct to add booleans in order to count the number of true values in a vector?
Is it conceptually correct to sum a vector of booleans? From a mathematical point of view, I would argue it's not: True + True != 2. But it's quite practical to do so still! Example using the ...
3
votes
2answers
75 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, ...
3
votes
6answers
499 views
How to resolve methods with the same name and parameter types?
In many cases, I want to write methods that have the same functionality for different types of inputs. This is easily accomplished by method overloading if the parameter types are different.
But ...
2
votes
1answer
432 views
Recovering an anemic domain model into a multitier architecture
I have spent the past several days learning about domain driven design and attempting to apply it to a current project. I decomposed the problem domain into the canonical logical components: domain, ...
