Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [design]

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

49
votes
9answers
13k views

Code Smell: Inheritance Abuse [duplicate]

It's been generally accepted in the OO community that one should "favor composition over inheritance". On the other hand, inheritance does provide both polymorphism and a straightforward, terse way of ...
43
votes
10answers
5k views

Be liberal in what you accept… or not?

[Disclaimer: this question is subjective, but I would prefer getting answers backed by facts and/or reflexions] I think everyone knows about the Robustness Principle, usually summed up by Postel's ...
3
votes
2answers
185 views

Is there a valid reason to wrap built in type with your own

I am editing some c++ and all of the built in types have been wrapped in a corresponding wrapper class. All of the operators have been overloaded to do bizarre things like operator[] coded to ignore ...
1
vote
7answers
647 views

Would you use UML if it kept stakeholders from requesting changes frequently? [closed]

As much as programmers hate to document their code/system and draw UML (especially, Sequencing, Activity and State machine diagrams) or other diagramming notation, would you agree to do it if it kept ...
28
votes
12answers
3k views

How large is ok for a Class?

I’m a long time developer (I’m 49) but rather new to object oriented development. I’ve been reading about OO since Bertrand Meyer’s Eiffel, but have done really little OO programming. The point is ...
1
vote
2answers
362 views

hiring a web designer: design task

I need to hire a web designer. How do I test his creativity and skills before I hire him. Ideally I'd like to give him a fairly open-ended task i.e. I give him a problem statement and ask him to ...
23
votes
10answers
2k views

What is the proper way to create requirements documents?

Right now my supervisor is creating requirements documentation / specs for me using bugtracking software. This seems like a terrible idea to me, all the requirements are on these little tickets and I ...
31
votes
11answers
4k views

Are design patterns generally a force for good or bad? [closed]

I've heard it argued that design patterns are the best thing since sliced bread. I've also heard it argued that design patterns tend to exacerbate "Second System Syndrome," that they are massively ...
22
votes
6answers
1k views

Is loose coupling w/o use cases an anti-pattern?

Loose coupling is, to some developers, the holy grail of well-engineered software. It's certainly a good thing when it makes code more flexible in the face of changes that are likely to occur in the ...
6
votes
3answers
2k views

How much time do you devote to the design document(s) for your software?

Obviously the size of the project you're working on will be a huge factor in how long you spend writing the design document/specification. But do you go through everything, picking out every tiny ...
6
votes
4answers
1k views

What is a good way to brainstorm algorithms on a computer? [closed]

I'm looking for something that allows me to work out an algorithm on a computer similar to how I would do it on a whiteboard. At work, I have a huge whiteboard that I can use for this, but at home, I ...
5
votes
3answers
488 views

Should a developer adhere to the class diagrams produced during system design?

The class diagram is modeled on the system requirements, and it is important to create solutions based on those requirements. If I have said class diagram should I strictly adhere to it? What about ...
3
votes
4answers
326 views

How do you think about and architect programs? [closed]

I'm a QA guy and designer and i'm coming to development. How do most developers architect programs? With design I build up with a vague idea of what I have in mind and adapt my design to keep in ...
16
votes
7answers
526 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. ...
35
votes
9answers
3k views

Design for future changes or solve the problem at hand [closed]

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 ...
197
votes
17answers
51k views

Is premature optimization really the root of all evil?

A colleague of mine today committed a class called ThreadLocalFormat, which basically moved instances of Java Format classes into a thread local, since they are not thread safe and "relatively ...
62
votes
4answers
22k 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?