2,783 reputation
1227
bio website
location Argentina
age 37
visits member for 3 years, 7 months
seen yesterday

Software developer and science fiction fan.


Feb
15
comment How to write useful Java programs without using mutable variables
@thiton Disagreed. What Blrfl is saying is that those functions probably use variables written in the same programming language. No need to go low-level here. The snippet is merely using library functions. You can easily write the same code in Java, see: squaresOf(integers()).take(25) (writing those functions is left as an exercise for the reader; the difficulty lies in the infinite set for integers(), but that's a problem for Java because of its eager evaluation, nothing to do with variables)
Feb
9
comment Erlang/Haskell web service to server files
@FlorianMargaine Both languages are perfectly suitable for web programming, so I don't get your point.
Feb
7
comment When to write Unit Tests : Is there any or list of terms to take right decision
I know what you're saying. But imagine this: I assume you realize 100% coverage is unattainable; imagine someone else saying "well, it's only a rule of thumb, but you should strive for 100% coverage whenever possible". But it's not that easy! 100% coverage might get in the way of actually delivering features. So it's not always a good idea to spend time on it. Same with actual unit tests. Maybe the cost of maintenance is too high for everything to be unit-tested; maybe you should focus on the portions that merit unit-testing. Same for TDD (regardless of what Uncle Bob says).
Feb
7
comment When to write Unit Tests : Is there any or list of terms to take right decision
Ugh, unfortunately Uncle Bob has lots of fundamentalist, extremist assertions such as "I want you to believe that Test Driven Development saves time in every case and every situation without exception amen." Yuck, talk about an unhelpful assertion.
Feb
7
comment When to write Unit Tests : Is there any or list of terms to take right decision
Unfortunately the rule of thumb lacks real world nuances. For example, it's not always a good idea to write unit tests for GUI code. Or anywhere else the costs of maintenance outweight the benefits.
Feb
7
comment When to write Unit Tests : Is there any or list of terms to take right decision
@LaurentBourgault-Roy If the warp coil is seconds away from an explosion, it's bye-bye Enterprise either way :P
Feb
7
awarded  Yearling
Feb
4
comment Is path coverage stronger than condition coverage?
@MichaelIT You are referring to something else. CONDITION coverage cares about boolean subexpressions, which is different to BRANCH coverage which only cares about the outcome of the whole decision. I do remember being told the distinction on my CS/software engineering courses.
Feb
3
comment How should you TDD a Yahtzee game?
The million dollar question is, did you derive the Yahtzee AI using pure TDD? My bet is that you can't; you have to use domain knowledge, which by definition isn't blind :)
Feb
3
comment How should you TDD a Yahtzee game?
"Write the simplest thing that works", like @Carson63000, is actually a simplification. It's actually dangerous to think like that; it leads to the infamous Sudoku TDD debacle (google it). When followed blindly, TDD is indeed braindead: you cannot generalize an non-trivial algorithm by blindly doing "the simplest thing that works"... you have to actually think! Unfortunately, even alleged masters of XP and TDD sometimes follow it blindly...
Feb
1
comment Is it time to deprecate synchronized, wait and notify?
@StephenC A nitpick: going by the Java docs you linked to, I don't think deprecation means the deprecated code is broken. That's one reason, but as the docs says, an API can be deprecated when it's superseded by a newer, better API (as, the OP argues, is the case with concurrency). And low-level concurrency, if not actually encouraging bad practices, is certainly very error prone.
Jan
31
comment Copying (forking) an open source project to your own repository
As far as I can tell it seems to be allowed by the license (Microsoft Public License), but why don't you email the author?
Jan
30
awarded  Nice Answer
Jan
30
comment Why did memory-managed languages like Java, Javascript, and C# retain the `new` keyword?
So that's your argument? "Java designers needed the new keyword because otherwise Java's syntax would have been different"? I'm sure you can see the weakness of that argument ;) And yes, you keep discussing syntax, not semantics. Also, backwards compatibility with what? If you are designing a new language, such as Java, you are already incompatible with C and C++!
Jan
30
comment Why did memory-managed languages like Java, Javascript, and C# retain the `new` keyword?
Sorry, I don't follow your argument. You are effectively arguing syntax, not semantics, and anyway the question was about new for managed languages. I have shown that new is not at all needed (e.g. Scala doesn't need it for case classes) and also that there is no ambiguity (since you absolutely cannot have a method named MyClass in class MyClass anyway). There is no ambiguity for String s = String("hello"); it cannot be anything else but a constructor. And finally, I disagree: code conventions are there to enhance and clarify the syntax, which is what you're arguing about!
Jan
29
comment Why did memory-managed languages like Java, Javascript, and C# retain the `new` keyword?
Oh, right. C# has different conventions. To be fair, your example was Java. And anyway, my Scala example shows it's not important even then.
Jan
29
comment Why did memory-managed languages like Java, Javascript, and C# retain the `new` keyword?
But it's not obvious. First, having a regular method named String goes against Java style conventions, so you can just assume any method starting with uppercase is a constructor. And second, if we aren't constrained by Java, then Scala has "case classes" where the constructor looks exactly like I said. So where is the problem?
Jan
29
comment Why did memory-managed languages like Java, Javascript, and C# retain the `new` keyword?
But this wasn't the question. The question was "why not String myString = String("myString");?" (note the absence of the new keyword)
Jan
29
comment I don't understand why algorithms are so special
@CWallach Using a library function in your own code is also an algorithm, if you understand the term to mean "following a series of steps in order to produce a result"; it's just that one of those steps is "call this library function". Also, someone has to write that library!
Jan
29
comment Why Java does not allow function definitions to be present outside of the class?
@Baqueta In Java you can achieve this with interface and class :) No need for headers!