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

learn more… | top users | synonyms (1)

57
votes
8answers
6k views

Are design patterns really essential nowadays?

I was reading "Coders at Work" and have faced the fact that some of the professionals interviewed in the book are not so enthusiastic about design patterns. I think that there are 2 main reasons for ...
41
votes
12answers
3k 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? ...
22
votes
12answers
3k views

Dealing with bad/incomplete/unclear specifications? [duplicate]

I'm working on a project where our dev team gets the specifications from the business part of the company. Both the business management and the IT management require estimates and deadline ...
36
votes
7answers
26k views

When to use abstract classes instead of interfaces with extension methods in C#?

"Abstract class" and "interface" are similar concepts, with interface being the more abstract of the two. One differentiating factor is that abstract classes provide method implementations for derived ...
11
votes
5answers
4k views

What to plan before starting development on a project?

Say I've received the specs for a project from a client, and now its time to start developing it. Normally, I just start with the first module (usually user registration) and then go from one module ...
14
votes
0answers
2k views

Design and Development Methodologies for the single developer

At my work, typically the developers here all work separately, we may share projects but often only do so when another isn't working on it (for reference, we're a consulting company. So someone may ...
16
votes
9answers
1k views

How to recruit programmers for an open source project and kick-start it? [closed]

I would like to start an open source project, and would like to do a collaborative effort in starting it. I have a clear idea of what I want, but not yet a formal specification (I would like to do ...
36
votes
9answers
4k 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 ...
20
votes
8answers
932 views

When do you rebuild an application or keep on fixing the existing one [duplicate]

Possible Duplicates: When is a BIG Rewrite the answer? Have you ever been involved in a BIG Rewrite? I am at a customer where I have been tasked to fix a number of issues they have in their ...
71
votes
7answers
5k views

Is this a violation of the Liskov Substitution Principle?

Say we have a list of Task entities, and a ProjectTask sub type. Tasks can be closed at any time, except ProjectTasks which cannot be closed once they have a status of Started. The UI should ensure ...
63
votes
17answers
12k 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 ...
8
votes
9answers
386 views

Internationalization : What things to think about?

I was listening to Jon Skeet's talk at the last StackOverflow Dev Days and he piqued my curiousity regarding internationalization. Suppose I have a waffle-making program, either complete, or still in ...
5
votes
1answer
602 views

Is wrapping a third party code the only solution to unit test its consumers?

I'm doing unit testing and in one of my classes I need to send a mail from one of the methods, so using constructor injection I inject an instance of Zend_Mail class which is in Zend framework. Now ...
50
votes
13answers
11k views

What is the ideal length of a method?

In object-oriented programming, there is no exact rule on the maximum length of a method , but I still found these two qutes somewhat contradicting each other, so I would like to hear what you think. ...
20
votes
3answers
3k views

How to become good at object-oriented analysis and design (OOAD)?

Becoming a good analyzer and designer can greatly benefit a developer. But there are definitely obstacles for this. Not everybody is interested in OOAD, and not every person who is interested, knows ...
15
votes
8answers
1k views

Is perfectionism a newbie's friend or enemy? [duplicate]

Possible Duplicate: Where do you draw the line for your perfectionism? I see that the development community is very focused on doing things the right way and personally I would like to do ...
11
votes
4answers
2k views

How much design to do first? [duplicate]

I have never worked with a professional software development team. As such, analyzing and thinking about each and every aspect of my software does not come naturally to me. Whenever I strike an idea ...
17
votes
13answers
720 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 ...
6
votes
2answers
592 views

Solutions for floating point rounding errors

In building an application that deals with a lot of mathematical calculations, I have encountered the problem that certain numbers cause rounding errors. While I understand that floating point is not ...
20
votes
4answers
2k views

Architectural differences between dynamic and static languages

Are 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)? Which are the ...
13
votes
0answers
599 views

How do you dive into a big ball of mud? [duplicate]

Possible Duplicate: How do you dive into large code bases? So there is a question about understanding code. Mine is a similar problem. It started when I joined my current org. and like I ...
83
votes
10answers
9k 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 ...
24
votes
10answers
2k views

Concurrency: How do you approach the design and debug the implementation?

I've been developing concurrent systems for several years now, and I have a pretty good grasp on the subject despite my lack of formal training (i.e. no degree). There's a few new languages that have ...
14
votes
3answers
452 views

Learning about design [closed]

How do you improve your ability to design your applications? Where do you get your design ideas from? (I am asking about code design - not about a specific language and not about visual appeal). When ...
18
votes
8answers
2k views

What can go wrong if the Liskov substitution principle is violated?

I was following this highly voted question on possible violation of Liskov Substitution principle. I know what the Liskov Substitution principle is, but what is still not clear in my mind is what ...
7
votes
4answers
637 views

Rails: Law of Demeter Confusion

I am reading a book called Rails AntiPatterns and they talk about using delegation to to avoid breaking the Law of Demeter. Here is their prime example: They believe that calling something like this ...
49
votes
4answers
3k views

Why were Java collections implemented with “optional methods” in the interface?

During my first implementation extending the Java collection framework, I was quite surprised to see that the collection interface contains methods declared as optional. The implementer is expected ...
18
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 ...
1
vote
3answers
950 views

Compiler/OS Design - Where to start [closed]

I have a fairly strong background in C and Assembly and I am starting to look into basic compiler and operating systems design, but my biggest problem is where I should really start, seeing as both ...
20
votes
8answers
902 views

Are there good techniques or tests for naming types?

An awkward, open question, but it's a problem I'm always bumping against: Software that's easy to maintain and work with is software designed well. Trying to make a design intuitive means naming your ...
11
votes
1answer
611 views

How to verify the Liskov substitution principle in an inheritance hierarchy?

Inspired by this answer: Liskov Substitution Principle requires that Preconditions cannot be strengthened in a subtype. Postconditions cannot be weakened in a subtype. Invariants ...
8
votes
5answers
2k views

Good references for End User documentation examples and advise [closed]

Our in house software has been used for many users and the training department asked us for any tips of end user documentation format. Does any know where can I find good examples of software end ...
8
votes
3answers
5k views

Generic file parser design in Java using the Strategy pattern

I am working on a product in which the responsibility of one of the modules is to parse XML files and dump the required content in a database. Even though the present requirement is only to parse XML ...
5
votes
4answers
349 views

Passing compound object for parameters

I have different data modules, which take a couple of parameters from a configuration list. Do you think it's ok to pass a configuration object as a whole module1(config) and let the module pick what ...
3
votes
1answer
690 views

How to refactor a method which breaks “The law of Demeter” principle?

I often find myself breaking this principle (not intentially, just through bad design). However recently I've seen a bit of code that I'm not sure of the best approach. I have a number of classes. ...
18
votes
9answers
1k views

Good design: How much hackyness is acceptable? [duplicate]

Possible Duplicate: Prototyping vs. Clean Code at the early stages I'm right in front of a difficult decision. I have a problem in my codebase (it's in C++), which I could solve in two ...
13
votes
7answers
470 views

How does one decide if a data object type should be designed to be immutable?

I love the immutable "pattern" because of its strengths, and in the past I have found it beneficial to design systems with immutable data types (some, most or even all). Often when I do so, I find ...
5
votes
10answers
3k views

What do we mean by “design” in software engineering?

I have been reading about different software methodologies. Every method has a design phase to some extent, more or less. I am not clear on what we mean by designing. Does this mean writing your ...
3
votes
1answer
523 views

Composition vs. Inheritance [duplicate]

Here's what is given: public interface Request {} // there are 20 subclasses of Request public class CreateUserRequest implements Request { @NotEmpty public String userName; } // request ...
1
vote
3answers
645 views

I feel I'm a good junior programmer, but how to become a good programmer who writes beautiful code? [closed]

As a beginner, I can say that in about six months I grasped very well many basic programming concepts. I began with php, then wen to c, then to java, and I know quite well the procedural and the ...
159
votes
16answers
12k views

Started wrong with a project, should I start over?

I'm a beginner web developer (one year of experience). Here's my situation: A couple of weeks after graduating, I got offered a job to build a web application for a company where the owner (boss) is ...
81
votes
21answers
7k views

Is OOP hard because it is not natural?

One can often hear that OOP naturally corresponds to the way people think about the world. But I would strongly disagree with this statement: We (or at least I) conceptualize the world in terms of ...
50
votes
5answers
25k views

When do you use a struct instead of a class?

What are your rules of thumb for when to use structs vs. classes? I'm thinking of the C# definition of those terms but if your language has similar concepts I'd like to hear your opinion as well. I ...
30
votes
15answers
2k views

What can programmers learn from the construction industry? [closed]

When talking with colleagues about software design and development principles, I've noticed one of the most common sources for analogies is the construction industry. We build software and we ...
52
votes
10answers
3k views

My proposed design is usually worse than my colleague's - how do I get better? [closed]

I have been programming for couple of years and am generally good when it comes to fixing problems and creating small-to-medium scripts, however, I'm generally not good at designing large scale ...
36
votes
10answers
2k views

Clarify the Single Responsibility Principle

The Single Responsibility Principle states that a class should do one and only one thing. Some cases are pretty clear cut. Others, though, are difficult because what looks like "one thing" when ...
69
votes
15answers
11k 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 ...
36
votes
7answers
2k views

Can a system be 100% Data Driven?

My new boss has been working on this project for many years. I've only been here a few weeks, but I am not sure it's possible. He would like to design a system that is "100% data driven". So if we ...
19
votes
18answers
1k views

What order do you develop program layers?

I liked the question about favorite program layer: What is your favorite program layer to work on? What order do you build them in or do different team members develop corresponding parts ...
27
votes
8answers
3k 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 ...