Update: I realize the featured example is not the most optimal Quicksort implementation. I doesn't even handle duplicates. Indeed this variant was chosen primarely because of its aesthetics.
While I'd like to keep the mission of this project to "illustrating the basic mechanics of algorithms as elegantly as possible", I realize this can be a) annoying for people who understand the specifics in depth, and b) not enough (or confusing) for people just picking this up. Which is why I'm thinking of creating an info page for each algorithm to:
- Outline the limitations of the featured version
- List a number of possible improvements (e.g. pivot strategies)
- Link to external resources for complete examples & docs
Reminds me of some of my own side projects: great vision, massive effort, but then it just might not be 100% on point / what "the market" needs. You've accomplished a lot - as you know finishing any project is not easy at all and this one has quite a few clever and unique ideas in it!
Best thing imo is the idea to go forward and backward through code and see the results live. I'd love to have this to study or debug code, and to really see and understand the magic of some operations in a visualization like this.
The thing is, algorithms like Quicksort are quite involved. In order to understand I'd need at least 2 intermediate steps between the animation and the code:
- The core concepts, like "recursion, in place sorting, complexity/performance average/worst case, trouble when list already sorted" etc.
- The programming ideas, like "we pick a pivot, we use a random element from the list but you could use any", "our recursion stops when there is only 1 item in the sub-list" etc.
If these things were linked to a) the animation and b) the code and I could experience it all at once, that would be amazing (but a lot of work for you of course :-))
Also:
- I kept sorting the fruits by size somehow, and due to the language barrier a "P"ineapple would be an "A"nanas for me
- If I commit to learning something I like to go to a place that has comprehensive information, even if various places to one thing well.
- Preventing zoom and the scrolling code is not ideal imo.
- Code could be simpler and clearer.
- Maybe the task to explain Quicksort like this is just too huge
Thanks for this. It's often hard to miss the effort put into something by only pointing out flaws.
> Best thing imo is the idea to go forward and backward through code and see the results live
Yeah, this is the main idea and driver for me. The reason why I chose algorithms is because I could get reasonably small bits of code that accomplish a job on their own, and build something up top of that. Code is already open source and reusable, but turning this into a general purpose tool requires much more dedication. But you're right, introducing algorithms along with this concept also opens Pandora's box in terms of confusion & opinions.
While I'd like to keep the mission of this project to "illustrating the basic mechanics of algorithms as elegantly as possible", I realize this can be a) annoying for people who understand the specifics in depth, and b) not enough (or confusing) for people just picking this up. Which is why I'm thinking of creating an info page for each algorithm to:
Open discussion. What do you think?