Live data from Hacker News

Twitter Sort

github.com

21–30 of 55 posts

Re: Twitter Sort

#21
post #17

Hardcoding the validation of the reply is an unfortunate obstacle to scaling this - the server would very quickly become CPU bound. They should really have made a TwitterSortValidationService which sends the answer out to the Twitter API, and then listens for a response confirming whether or not the original sort was correct.

Easy, just use TwitterSort to validate TwitterSort. People can't be wrong twice!

Re: Twitter Sort

#23
post #17

Hardcoding the validation of the reply is an unfortunate obstacle to scaling this - the server would very quickly become CPU bound. They should really have made a TwitterSortValidationService which sends the answer out to the Twitter API, and then listens for a response confirming whether or not the original sort was correct.

Easy, just use TwitterSort to validate TwitterSort. People can't be wrong twice!

Even better, use stacksort to validate twitter sort! That means you get redundant architecture!

Re: Twitter Sort

#27
post #14

What about the locale of the user producing a different sort order?

They do specify that it's for sorting numbers, as opposed to say, text. Do some locales sort numbers differently?

They could interpret the input data differently.

For example, a decimal mark difference[1] between locales (like comma instead of a period in floating point numbers) could yield bad results.

[1] https://en.wikipedia.org/wiki/Decimal_mark

Re: Twitter Sort

#28

While potentially more efficient than bogosort for larger input size, this sorting algorithm has a serious limitation. I am of course talking about being limited to 140 characters per tweet. This seriously restricts maximum input size you can sort, which in turn severely cuts down on potential applications of this technology. Moreover, without deployed SAAS (sorting as a service) bot, algorithm is not deterministic w…

Maybe each comparison could be done via a tweet request.
Post reply on HN