2,823 reputation
1330
bio website
location Argentina
age 38
visits member for 4 years, 2 months
seen 16 hours ago

Software developer and science fiction fan.


Feb
25
comment Is there any necessity to pass a variable parameter to a method while the variable declared global?
Muztaba, that's not enough. How would someone reading the signature of monteCarlo know that the method modifies a global variable?
Feb
25
comment Is there any necessity to pass a variable parameter to a method while the variable declared global?
Mods: doesn't this kind of question belong in Code Review?
Feb
25
comment Is there any necessity to pass a variable parameter to a method while the variable declared global?
Your monteCarlo method is problematic: it modifies a global variable not passed as an argument, which may be puzzling to readers of your code. Better to assign to matrix outside the method.
Feb
25
revised Is there any necessity to pass a variable parameter to a method while the variable declared global?
fixed code formatting and removed "thanks!"
Feb
24
comment When to use a SortedMap interface?
Your first example is a case of "Use the most general type/interface possible": Map is more general than SortedMap; hence, if you just need a Map, use a Map. No need to invoke the second principle about simplicity :)
Feb
24
comment When to use a SortedMap interface?
@RobertHarvey I don't know about Java, but using the Most General Type is standard practice in functional programming / typed lambda calculus / generic programming. In general, it makes sense even for Java: you should use the constraints you need, and only those you need. There is good reason for this: the fewer assumptions you make about a type, the fewer mistakes you can commit.
Feb
12
comment Does this python program obey functional paradigm?
@overexchange Please, this is not the site for code reviews. You asked a prior conceptual question, and you have some reasonable answers. If you don't understand them/disagree, please follow it up in that question. Do not continue asking with different code snippets in different questions.
Feb
12
comment Does this python program obey functional paradigm?
possible duplicate of How do I enforce 'referential transparency' in this program?
Feb
10
comment How do I enforce 'referential transparency' in this program?
@ziggystar True, but note that the definition (and the question) is about referential transparency for every subexpression. What you describe is referentially transparent from outside, but not from inside (if you use a mutable cache, there are inner subexpressions which you cannot freely replace).
Feb
9
comment What's the point with HATEOAS on the client-side?
Wouldn't this mean that you must build a client as complex (and bug prone) as a browser? Flexibility often comes with complexity as a cost...
Feb
7
awarded  Yearling
Feb
6
comment Relation between object orientation and algorithms
Note that in a possibly imperfect way, declarative languages aim at reducing or eliminating the "how" step. Their goal is for you to simply say "this is what I want" (for example, by writing high level equations). Think of a typical SQL query: very little of it is "algorithmic"; you simply tell the database what you want, and it's up to it how it handles your request (within certain limitations, of course).
Feb
6
comment Relation between object orientation and algorithms
This seems like too broad to me. There are at least 4 separate questions in there. I suggest you focus on only one and remove the rest.
Feb
5
revised In what case a use case should be written
removed irrelevant tag about functional-programming
Feb
4
comment Does it matter how I format the name of a function?
@Den Are you arguing that you shouldn't follow F#'s style conventions when coding in F#? If so, that's terrible advice.
Feb
3
comment What's the benefit of GIT for solo programmer?
I have to side with gnat on this: the OP is confusing git with github, not bothering to look into source control in general and its rationale, displaying unwarranted sarcasm in the question... this sounds like a rant in disguise, and it shows very poor research.
Jan
28
comment Leaving intentional bugs in code for testers to find
+1 It reminded me of that DailyWTF post too!
Jan
27
revised Is the 'finally' portion of a 'try … catch … finally' construct even necessary?
code formatting
Jan
27
reviewed No Action Needed Is factory pattern a right pattern for the situation described here?
Jan
27
reviewed No Action Needed Is factory pattern a right pattern for the situation described here?