general tips and guidelines for designing better applications, regarding APIs, Architecture and internal structures.
Questions tagged [design-decisions]
93 questions
40
votes
9 answers
When should I not use the ThreadPool in .Net?
When should I not use the ThreadPool in .Net?
It looks like the best option is to use a ThreadPool, in which case, why is it not the only option?
What are your experiences around this?

Vaibhav
- 11,310
- 11
- 51
- 70
38
votes
7 answers
Is it wrong to use the hand cursor for clickable items such as buttons?
I've always thought the hand cursor to be the ideal visual indicator for "you may click here" to the user. We are used to see it in this context daily because of it's usage on hyperlinks and hence all web buttons.
However, most…

Camilo Martin
- 37,236
- 20
- 111
- 154
27
votes
1 answer
.NET Tuple and Equals performance
This is something I had not noticed until today. Apparently, the .NET implementation of the much used tuple classes (Tuple, Tuple etc) causes boxing penalties for value types when equality based operations are performed.
Here is how the…

nawfal
- 70,104
- 56
- 326
- 368
24
votes
1 answer
Is there a design reason why std::set doesnt have front and back member functions?
I know I can use *s.begin(), but same argument can be used for vector, which has front/back
often I use the ordered property of set/map to get "smallest" element/key - ofc the fact that I do it is not the reason to have it, just a example :)
Here…

NoSenseEtAl
- 28,205
- 28
- 128
- 277
16
votes
4 answers
Design decisions: Why and when to make an interface private?
Are private interfaces ever used in design decisions ? If so, what are the reasons and when do you know the need for a private interface?

Jon
- 161
- 1
- 1
- 3
16
votes
2 answers
Why are System.Drawing Rectangle, Point, Size etc mutable structs and not classes?
Is there a reason Microsoft decided to make these structs?
All three are mutable. I would find them much easier to deal with if they were either immutable, or if they were reference types.
If there are reasons they must be structs, why are they…

Flash
- 15,945
- 13
- 70
- 98
12
votes
6 answers
IdbConnection vs. SqlConnection
When I write an app, I use the System.Data interfaces (IDbConnection, IDbCommand, IDataReader, IDbDataParameter, etc...). I do this to reduce vendor dependencies. Unless, I'm doing a simple test app, it just seems like the ethical thing to do when…

John MacIntyre
- 12,910
- 13
- 67
- 106
8
votes
3 answers
Why Array#slice and Array#slice! behave differently?
I could not understand why, in Ruby, Array#slice and Array#slice! behave differently than Array#sort and Array#sort! (in the way that one returns the results on a new Array and the other works on the current object).
With sort the first one…

Vargas
- 2,125
- 2
- 33
- 53
7
votes
5 answers
What scripting language for our .NET based IDE?
We have an IDE for machine automation that allows its users to develop solutions by connecting objects and components visually. They can also write "plugins" using C++ and C#. The IDE is written using .NET. Its users often are not founded in…

bitbonk
- 48,890
- 37
- 186
- 278
7
votes
3 answers
Windows Services -- High availability scenarios and design approach
Let's say I have a standalone windows service running in a windows server machine. How to make sure it is highly available?
1). What are all the design level guidelines that you can propose?
2). How to make it highly available like…

asyncwait
- 4,457
- 4
- 40
- 53
7
votes
1 answer
Credit card system implementation?
My site is going to have a credit system that basically works a lot like a credit card. Each user has an unlimited credit limit, but at the end of each week, they have to pay it off. For example, a user might make several purchases between March 1st…

mpen
- 272,448
- 266
- 850
- 1,236
6
votes
1 answer
In React, why can't you add a key to an empty fragment (short syntax)?
I know that, in React, you can't add a key to an empty fragment:
// will result in an error
< key={'foo'} >
{...}
>
Instead, you need to use React.Fragment:
// works fine
{...}
The React…

Nathan
- 73,987
- 14
- 40
- 69
6
votes
8 answers
Bad design decision to throw an exception from an accessor?
I have read some answers re the pro's and con's of throwing an exception within an accessor, but I thought I would broach my specific question with an example:
public class App {
static class Test {
private List strings;
…

wulfgarpro
- 6,666
- 12
- 69
- 110
6
votes
1 answer
Why does x86-64 use IA-64 C++ ABI?
From the x86-64 psABI:
9.1 C++
For the C++ ABI we will use the IA-64 C++ ABI and instantiate it appropriately.
The current draft of that ABI is available at:
http://mentorembedded.github.io/cxx-abi/
Why not design its own ABI?

Chen Li
- 4,824
- 3
- 28
- 55
6
votes
4 answers
What is the difference between using cfinvoke and createObject to run a component function?
In my company's code, I've often seen component files used by initializing an object of that component and calling the methods off the object. However, it seems to me somewhat more straightforward to use the cfinvoke method, especially when only…

froadie
- 79,995
- 75
- 166
- 235