Lurker News

Comments (198) 66 threads

Show all comments

Showing thread 3 of 66

gkoberger2 replies#
This was inspired by the alt-text from last week's "Ineffective Sorts" xkcd (http://xkcd.com/1185/).

It tries to sort a list or JSON by fetching code from StackOverflow until it properly sorts the input.

fwenzel2 replies#
Do you test the result, or just hope if it runs, it actually worked?
jstanley#
I found one that returned the wrong result, so it seems to just assume it works as long as it runs.
gkoberger1 reply#
It doesn't test for two reasons:

1) I thought it would defeat the purpose
2) "Sort" is very arbitrary. Do you want to sort by key or value? Is "1000" bigger or smaller than "2"? etc

fwenzel1 reply#
Fair; also, it's called an 'ineffective' sort, and if you tested it, it'd become effective (not efficient, of course). So, good point!

Continue this thread — 1 reply