V
Veloso
Sun's main Java site has an interview with Heinz Kabutz, (http://
java.sun.com/developer/technicalArticles/Interviews/community/
kabutz_qa.html) the a "Java Champion" and creator of the "Java
Specialists Newsletter". He's an impressive guy and says some
provocative things I don't entirely get:
"The java.util.Arrays class is a good example of bad code. It contains
two mergeSort(Object[]) methods, one taking a Comparator, the other
using Comparable. The methods are virtually identical and could have
been merged into one with the introduction of a DefaultComparator that
would use the Comparable method. The strategy pattern would have
avoided this design flaw."
I've always liked "Arrays' and the way Java makes it so easy to
manipulate arrays with searching, sorting, filling, comparing etc. I
don't see how the "design flaw" makes such a big difference. It seems
to me that Kabutz is just being picky, but I'm probably missing
something.
Can someone explain why this really matters in actual coding?
Kabutz also gives Java developers a hard time for not unit testing. He
argues that it's a major problem and that few Java developers do it.
I'm curious: Has anyone gotten into big trouble for not unit testing?
Is it a major source of bugs in your experience? It's not a big
problem among people I talk to -- a limited sample.
Are there any non-unit testers who are as blithe about this as I am?
Kabutz is fun in that he talks about the pleasures of sitting on the
beach and coding in Crete where he lives. He also absolutely does not
get why open sourcing the platform is a big deal. Certainly to most
Java developer, it's pretty irrelevant...
java.sun.com/developer/technicalArticles/Interviews/community/
kabutz_qa.html) the a "Java Champion" and creator of the "Java
Specialists Newsletter". He's an impressive guy and says some
provocative things I don't entirely get:
"The java.util.Arrays class is a good example of bad code. It contains
two mergeSort(Object[]) methods, one taking a Comparator, the other
using Comparable. The methods are virtually identical and could have
been merged into one with the introduction of a DefaultComparator that
would use the Comparable method. The strategy pattern would have
avoided this design flaw."
I've always liked "Arrays' and the way Java makes it so easy to
manipulate arrays with searching, sorting, filling, comparing etc. I
don't see how the "design flaw" makes such a big difference. It seems
to me that Kabutz is just being picky, but I'm probably missing
something.
Can someone explain why this really matters in actual coding?
Kabutz also gives Java developers a hard time for not unit testing. He
argues that it's a major problem and that few Java developers do it.
I'm curious: Has anyone gotten into big trouble for not unit testing?
Is it a major source of bugs in your experience? It's not a big
problem among people I talk to -- a limited sample.
Are there any non-unit testers who are as blithe about this as I am?
Kabutz is fun in that he talks about the pleasures of sitting on the
beach and coding in Crete where he lives. He also absolutely does not
get why open sourcing the platform is a big deal. Certainly to most
Java developer, it's pretty irrelevant...