2,679 reputation
1127
bio website
location Argentina
age 37
visits member for 3 years, 2 months
seen Apr 17 at 15:23

Software developer and science fiction fan.


Apr
16
comment How would another popular language avoid having to use the factory pattern while managing similar complexity as in Java/Java EE?
"In many dynamic languages" is a bit misleading, since what's actually needed is a language with first-class functions. "Dynamic" is orthogonal to this.
Apr
11
reviewed Reject suggested edit on What's the difference between computer science and programming?
Apr
5
comment Does functional programming add complexity in code?
Brendan, your definition of well-written is nonstandard. Well-written is always relative to the language and its community. A program in language X is well-written if it's not buggy, it's efficient and clear... for the given audience! This applies to written language in general, by the way: always know your audience. What is suitable for (say) a scientific paper is probably not suitable for an email to your mom.
Apr
4
comment Are there flavours of OOP where some or all of the SOLID principles are antithetical to clean code?
How is this an example of SOLID principles running contrary to clean code in OOP? It seems more like an example of an incorrect design -- this is orthogonal to OOP!
Apr
4
comment Does functional programming add complexity in code?
This is simply not true: "Well written code can be read by people who aren't familiar with the specific programming language."
Apr
4
comment Does functional programming add complexity in code?
This is hard to see because most of us come from imperative backgrounds, which sometimes leads us to make the wrong assumptions about what's natural.
Apr
4
comment Does functional programming add complexity in code?
It also has a lot to do with the community. For a developer with a Java or C# background, the code is barely understandable (and his/her community wouldn't understand it either). But if you write Haskell, for example, and you don't use monads, applicatives, functors and so on, you are baffling that language's community. The "naturalness" of code is not inherent, but relative to its community and established practices.
Apr
4
comment Does functional programming add complexity in code?
You are just unfamiliar with the idioms. @user949300 short variables are not really a problem for lot of functional code (think about Math style conventions!). Also read Tony Morris' blog for a more in-depth discussion of what better conveys meaning, types or verbose variable names.
Mar
5
comment How can I explain the A a = new B();?
As for your last question: have you tried running the code? This is very easy to test...
Feb
24
comment Do we need Logging when doing TDD?
It's trivial to prove that "100% test coverage that passes != bug free". Counterexample: add(x, y) = 2 (always returns 2). The following test passes and provides full coverage: assert(2 == add(1,1)). 100% test coverage for a buggy function :)
Feb
24
comment Do we need Logging when doing TDD?
The edit is still incorrect. Even if you have 100% test coverage, there can be a bug in your code (no need to blame external causes). Tests do NOT imply your code work; the only thing they imply with any certainty is that you failed to write a test that finds a bug :) Test coverage is an important metric, but is not directly related to the absence of bugs.
Feb
24
revised Do we need Logging when doing TDD?
added 2 characters in body
Feb
24
comment Do we need Logging when doing TDD?
+1 for performance logging, good point!
Feb
24
revised Do we need Logging when doing TDD?
deleted 4 characters in body
Feb
24
answered Do we need Logging when doing TDD?
Feb
24
comment Do we need Logging when doing TDD?
You can never know your software will never crash EVEN if you have 100% coverage. 100% coverage, while desirable, gives a lot less information about correctness than it would seem.
Feb
20
reviewed Reject suggested edit on Does it make sense to write tests for legacy code when there is no time for a complete refactoring?
Feb
19
comment Indirection: Readability vs Performance
@aragaer Well, if you've found a better way to handle readability vs performance, you are not going to share your code with anyone else, and it isn't going to be used for anything that requires industry best practices, testing or verification, then suit yourself... I guess :)
Feb
19
comment Indirection: Readability vs Performance
@aragaer Arranging your code in a modular, easy to understand way will make it easier for you to play with it. Well written code will benefit even a team of one. Maybe if you just want to write a one-off, try something and discard the code... in that case you probably can disregard all best practices.
Feb
19
comment In functional programming how does one achieve modularity through mathematical laws?
@leeand00 I think you are misusing the term "verification". Modularity and reusability are not directly checked by software verification (though, of course, lack of modularity can make the software harder to maintain and reuse, therefore introducing bugs and failing the verification process).