Questions tagged [design]

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

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

5162 questions
174
votes
21 answers

How do quick & dirty programmers know they got it right?

If you ask programmers why they should write clean code, the number one answer you get is maintainability. While that's on my list, my main reason is more immediate and less altruistic: I can't tell if my new code is correct if it's too dirty. I…
Karl Bielefeldt
  • 147,435
91
votes
8 answers

What is "Soft Coding", really?

In this article by Alex Papadimoulis, you can see this snippet: private void attachSupplementalDocuments() { if (stateCode == "AZ" || stateCode == "TX") { //SR008-04X/I are always required in these states attachDocument("SR008-04X"); …
RaidenF
  • 1,579
86
votes
18 answers

Design flaws and dealing with humiliation from it

Have you always been fundamentally correct in the software designs you proposed? When you give out some design that was fundamentally wrong, you tend to lose the respect of your fellow team members. No matter what you do after that you end up being…
user20358
  • 713
78
votes
16 answers

Should we design programs to randomly kill themselves?

In a nutshell, should we design death into our programs, processes, and threads at a low level, for the good of the overall system? Failures happen. Processes die. We plan for disaster and occasionally recover from it. But we rarely design and…
jimbo
  • 861
73
votes
7 answers

Should I follow the normal path or fail early?

From the Code Complete book comes the following quote: "Put the normal case after the if rather than after the else" Which means that exceptions/deviations from the standard path should be put in the else case. But The Pragmatic Programmer teaches…
jao
  • 1,123
61
votes
10 answers

Is it typical for there to be no real design prior to someone being assigned a task?

I'm a junior engineer, but I've worked at two companies now. In both cases I've found that my colleagues and I are assigned tasks with no thought put into the design before being told to do it. Typically I spend about 90% of my time writing down on…
55
votes
13 answers

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 Law: Be conservative in what you send; be liberal…
Matthieu M.
  • 14,896
54
votes
7 answers

Referencing database values in business logic

I guess this is another question about hard coding and best practices. Say I have a list of values, lets say fruit, stored in the database (it needs to be in the database as the table is used for other purposes such as SSRS reports), with an ID: 1…
Kate
  • 643
52
votes
15 answers

Is it normal to think about a design problem for days with no code written?

Sometimes I stare blankly into space or sketch ideas and write some pseudo codes on paper. Then I scratch it out and start again, then when I think I have the correct solution for the problem I begin writing the code. Is it normal to think for days…
47
votes
7 answers

Two structs with the same members but different naming, is it a good idea?

I am writing a program that involves working with both polar and Cartesian coordinates. Does it make sense to create two different structs for each kind of points, one with X and Y members and one is with R and Theta members. Or is it too much and…
39
votes
9 answers

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 problem tends to complicate the things (which may…
Naveen
  • 1,957
38
votes
19 answers

Overused or abused programming techniques

Are there any techniques in programming that you find to be overused (I.E. used way more excessively than what they should be) or abused, or used a bit for everything, while not being a really good solution to many of the problems which people…
Anto
  • 11,187
  • 13
  • 68
  • 103
33
votes
6 answers

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? Edit: To expand/clarify, database normalization is…
32
votes
6 answers

When is a circular reference to a parent pointer acceptable?

This Stack Overflow question is about a child having reference to its parent, through a pointer. Comments were pretty critical initially of the design being a horrible idea. I understand this is probably not the best idea in general. From a general…
enderland
  • 12,131
32
votes
7 answers

What if I have no good ideas to implement a feature?

I'm working on my own application and I'm stuck. I have to implement a feature but I can't find a good approach to implement this feature. I was thinking about it for a couple of days, and no good thoughts came. Searching the Internet didn't give…
user21974
  • 473
1
2 3
13 14