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 |
A design pattern is a general reusable solution to a commonly occurring problem in software design.
0
votes
1
answer
150
views
Does the builder/factories pattern apply to this problem?
I have the following code and I am not sure if the builder factory is the best approach to solve this code duplication.
createA(a, b, c, e: {e1, e2}){
return{
a
b
c
e
}
}
crea …
0
votes
2
answers
2k
views
Is "error first" better than "if-else", why? [duplicate]
I have an eternal discussion in my work about why "error first" is "worng".
In order to ensure what I try to tell with error first is the following code pattern:
if condition:
raise Error()
code
…
10
votes
4
answers
2k
views
is this way of calling a function a bad practice?
I have the following code:
public void moveCameraTo(Location location){
moveCameraTo(location.getLatitude(), location.getLongitude());
}
public void moveCameraTo(double latitude, double longitud …