Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions about problem solving and planning for a solution through software design.
2
votes
Accepted
Moving Id generation from persistence layer to application layer
UUIDs are 128 bit integers, encoded in a string. If you can support 128 integers, you’re fine. Otherwise, take UUIDs as a 36 letter ASCII string. If you have 64 bit integers but not 128 bit, you can a …
1
vote
Is it typical for there to be no real design prior to someone being assigned a task?
The expectation is that you can perform all the design needed. How much design you need depends on your experience and on the size and complexity of the task. … Having a design is no guarantee that the design works in the end, so be prepared to through the design out.
Where you need planning ahead is when you have to agree on interfaces with colleagues. …
1
vote
Is it a good practice to use a class C as the member of class B that is the member of class ...
The only problem with this exact approach is that in languages like C++ DrivingSystem containing a Wheel means you have an instance of Wheel, and cannot have a subclass of Wheel. So in C++ you might p …
-1
votes
Avoiding getters and setters: what is wrong with my design?
Some people say: Getters and setters are evil. The most common reason why they say that is because they heard someone state this with a lot of conviction. But as we all learnt, stating something with …
-1
votes
How to architecture the big files download?
Do the work locally. Don’t read the whole 500MB at a time ob you, but maybe 10MB at a time. Make sure the client can resume a failed download, that makes everyone happier.
That’s the cheapest way to i …
1
vote
Prevent developer errors / debugging help
switch statements with an int value don’t allow the compiler to help you. But assume you use a library that provides an enum, then the compiler knows that all cases are covered, and a “default” case i …
1
vote
Breaking the contract: throw exception or do nothing?
What does your documentation say? I can't see any reason why you would treat null and a player outside your players list differently. If it's a bug, anyone calling it incorrectly won't handle your exc …
2
votes
Mutability and getters
For class B, is the fact that it has a reference to a Person just an implementation detail, or is it part of the spec of class B that it should provide access to a Person object?
That's the question …
0
votes
Can recursion be done in parallel? Would that make sense?
One problem is that the standard recursive algorithm for the fibonacci function is just awfully bad, since the number of calls to calculate fib (n) is equal to fib (n) which is a very fast growing. So …
4
votes
What's actually wrong with an endpoint returning HTML rather than JSON data?
There is nothing wrong in principle. The question is: What do you want to achieve?
JSON is perfect for transmitting data. If you send HTML instead and expect the client to extract the data from the …
3
votes
Switch vs Polymorphism
In your case, "switch vs. polymorphism" is the wrong question. To a large degree, the only difference between various diseases seems to be the colour. So if you have information that depends on the co …
6
votes
Does “refactoring” mean that you modify the entire design iteratively? If not, what does it ...
But refactoring may be done by throwing away some code and rewriting it from scratch, or doing small steps before a design is completely changed. …
3
votes
Code readability vs extensibility and flexibility, what is the relation?
There is one relationship: Code that is not readable is inflexible and hard to extend. It may in theory be flexible and extendible, but since it's not readable you won't be able to figure out how.
1
vote
Design a 1D parking lot that could park a two wheeler (1 slot), a car (2 slots) or a bus (4 ...
You want to allocate vehicles as near to the entrance as possible. I assume that each vehicle counts, so instead of allocating 4/1/1/1/1, you would prefer 1/1/1/1/4 which moves four vehicles to the fr …
2
votes
Can there be too much logging? (Front End & Back End)
Why are you doing logging? One reason is on the backend to have forensic evidence about attackers, we can ignore this. The other reason is to find hints what is going on if something goes wrong within …