News for hackers. Stuff that matters.
Re:The rise of never-ending job interviews by simias on Monday August 02, 2021 @09:28AM (#28036234)
I sometimes have to implement a sorting algorithm when I write bare metal code that doesn't have any sort of standard library available. Of course, being a 1337 hacker, I then resort to the state of the art bubble sort. Or maybe an insertion sort if I'm feeling fancy. But enough bragging.
Re:The rise of never-ending job interviews by jt2190 on Monday August 02, 2021 @10:21AM (#28036865)
OT: I wish I could relocate a blog post (on Microsoft’s site, I think) about a very a naive and “obviously wrong” sorting algorithm that a dev identified in their (Excel?) codebase. Turns out the code was naive because the vast majority of their users were sorting very small sets of data and the implementation actually performed much better in those circumstances.
Re:The rise of never-ending job interviews by jhck on Monday August 02, 2021 @12:37PM (#28038975)
Re:The rise of never-ending job interviews by JTbane on Monday August 02, 2021 @01:46PM (#28040063)
Funnily enough, if you're sorting small amounts of stuff it does not matter what algorithm you use. If fact your O(n log n) sorts are probably a lot slower on less than some millions of elements.
Re:The rise of never-ending job interviews by bear8642 on Monday August 02, 2021 @12:16PM (#28038623)
> I then resort to the state of the art bubble sort

Remember reading Bentley's Programming Pearls and fairly sure that's what he starts Sorting section with a short implementation of