
Journal eglamkowski's Journal: RandomSort() 10
For those who are still wondering, what this function does is it takes a list of names that are sorted alphabetically, assigns a random number to each one, then sorts the numbers so that the names appear to be random.
If I had written it I probably would have called it RandomizeList or RandomizeNames or some such, but no, this person had to call it RandomSort.
*rolls eyes*
Break their legs. (Score:2)
Re: (Score:2)
Is the issue with Random since computer generated randomness isn't technically random, or is it that its uses Sort instead of the more specific Name?
Or, likeliest of all, am I going to get me legs broken for missing the issue entirely?
Re: (Score:2)
Wow, that's the second time today that Firefox has crashed while typing in a post.
Back on topic: A better function name would have been RandomizeList as eglamkowski suggested. Or even "ScrambleList". Sort has a meaning to us CSE types.
Your legs are safe, the developer who wrote that f
Re: (Score:2)
Re: (Score:2)
This is going to hurt you more that it's going to hurt me.
WHOOOO!!! TO BE THE MAN, YOU'VE GOT TO BEAT ME MAN! WHOOOO!!
WHOOOO!! WHOOOOO!!
Re: (Score:1)
Looking at sorting more generically, it's just a particular criterion for (re-)ordering a list of items. The abstraction is reordering, and the order is the specific. So in this code I would've made functions ReorderSorted() and ReorderRandom().
Interesting idea (Score:2)
However, given your description, RandomSort makes sense of the name- in a rather assinine way. After all, first it randomizes, then it sorts. Two separate functions in one, and the name perfectly describes those two functions. The assinine part is that it doesn't explain the structure it's doing this to- not very good self-referencing code.
Re: (Score:1)
Of course, if you do have a specific company you want, the random order makes it a bitch to find,
Re: (Score:2)
Re: (Score:1)