Originally posted by Campbell Ritchie:
Arrays.sort()? Can you apply it to an object? Apart from the fact that all arrays are objects in their own right . . .?
Please look up the details here: click on Arrays, then METHOD, then find sort(Object).
You will see that you can sort an array of Objects, but they have to be Comparable, which means they have to implement the interface of that name.
For some reason computer science courses seem to think this is a useful skill.
Those things may be true. But in 25 years of professional business programming I have never encountered a situation where it mattered how data was sorted, nor have I ever had to write code to sort data. My opinion is that teaching sorting is the generals training the troops to fight the previous war.
Originally posted by Chad Clites:
Perhaps it is because being able to analyze algorithm efficiency is quite useful (and in a nerdy sort of way, a fun exercise at times)? Because computer science is more than "how to program"?
Do you have any actual evidence for that statement? Or are you just echoing received opinions? Personally I think it's the other way around. Better programmers can tell how things work without having to be taught. But I don't have any evidence for that either.
Originally posted by Rusty Shackleford:
Knowing how different API libraries work underneath makes for a better programmer even if they never have to actually write them.