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
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
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
Results tagged with Search options user 12828

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

11
votes
This is a judgement call that you have to make, on a case-by-case basis. First of all, remember that SOLID principles are just that ... principles. They're not rules. They're not a silver bullet. The …
answered Jan 11 '16 by pdr
6
votes
Is the whole idea of restricting access to a class's public functions in different ways for other different classes just silly altogether? Yes and no. Bear with me. Restricting access to a speci …
answered Jun 12 '14 by pdr
12
votes
I've been involved in projects like this twice now (both using nuget with .NET), and I would say that on balance it is a good idea. But your mileage may vary. Don't think for a minute that it's a pan …
answered May 27 '14 by pdr
2
votes
A class adapter IS a subclass, so you certainly shouldn't use it to adapt multiple subclasses. Even assuming that multiple inheritance is available in your language of choice, this would create an unm …
answered May 15 '14 by pdr
5
votes
Ideally, the UI shouldn't know about your business objects directly. It should know what it has to display and where to send any submission. The receiver of the submission should know how to process t …
answered Feb 6 '14 by pdr
1
vote
Let's say, for example, you wanted to cache or log that promotion, only when you access it through Game. Having broken the Law of Demeter, you cannot do this easily. You have to find every reference t …
answered Oct 16 '13 by pdr
13
votes
As you've identified, saveUser(User user) couples the two classes. This is not always bad. If the sole purpose of class B is to save a User then it's fair enough for it to expect a User object to save …
answered Sep 30 '13 by pdr
13
votes
Never trim whitespace arbitrarily in an API. The only reason to ever trim whitespace arbitrarily is as a UI feature. People frequently leave spaces at the end of entered fields but can't see that the …
answered Sep 27 '13 by pdr
5
votes
ISP is an interesting principle because the benefits (or rather the costs of ignoring it) are generally small, but the cost of implementation is also small. The kind of problem that might occur is if …
answered May 22 '13 by pdr
4
votes
What would you do if the message was in a database? Do the exact same thing. A web service is just another storage device, in essence. Your calling code should know nothing of the repository implemen …
answered May 9 '13 by pdr
11
votes
Note: this has been completely rewritten from my earlier example Think about power sockets. In any given nation, the high-level policy is that power sockets are always the same. It doesn't matter whe …
answered Apr 17 '13 by pdr
5
votes
It doesn't have to be, no. One example I can think of is in the .NET Framework in System.Net.WebRequest.Create(). It will return an object of a class derived from WebRequest, based on the protocol pa …
answered Apr 10 '13 by pdr
1
vote
Like any programming language, it's just a representation of an Abstract Syntax Tree. Any approach that you can use to represent a tree can be used to represent a program. Interconnecting blocks like …
answered Feb 10 '13 by pdr
7
votes
It's not unheard of for a service to have two repositories, but it is often a hint of a poor design. It's worth looking at, to see if you could improve your design but, if you look and you can't …
answered Nov 7 '12 by pdr
0
votes
There is absolutely no difference between having a Singleton object and using static methods on the Widget class. Widget.GetWidget and WidgetContainer.Instance.GetWidget carry exactly the same problem …
answered Nov 2 '12 by pdr

15 30 50 per page