- Added Disclaimer to clarify the project mission and limitations
- Created Footnotes section for insights collected from the community
Both can be found here: https://github.com/skidding/illustrated-algorithms/blob/mast...Thanks!
463 karma · joined June 18, 2010
- Added Disclaimer to clarify the project mission and limitations
- Created Footnotes section for insights collected from the community
Both can be found here: https://github.com/skidding/illustrated-algorithms/blob/mast...Thanks!
> 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:
- 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
Open discussion. What do you think?2) What do you mean?
Do you think these aspects can be incorporated without adding extra baggage for beginners (the primary target for this visualizations)?
I intended to compare objects of different heights at first, but ended up reusing the emoji tiles from Binary Search to reduce implementation time. I'll try to get more creative with the next (e.g. a maze for BFS).
Besides designing the illustrations, I've spent a lot of time crafting the framework so expect more of these in the future. Ongoing effort, but also tried to make the codebase approachable for others to learn from and be able to contribute: https://github.com/skidding/illustrated-algorithms
How would you make algorithms fun? Looking forward to ideas and feedback. Thanks!
Take a look at the project README for more info: https://github.com/uberVU/grid/blob/master/README.md
PS. We have some docs for these methods https://github.com/uberVU/grid#resizegridrows
We build the lib into two components. There's the jQuery-dependent one that just powers the UI interaction and translates cols and rows into pixels for DOM elements. Then there's the main logic, which is an agnostic class that implements all the grid positioning and collision management logic. This makes it possible to calculate new grid positions on the server-side. Same with running unit tests.
Either way it's just two API calls in the demo page, the buttons aren't part of the lib itself
Yes you can. The grid is generated left-to-right > top-to-bottom, based on a 1d index inside a list. So you can sort the unidimensional array of items however you want, and then regenerate 2d positions based on that.
> On feature I (need) think is missing is the ability to freely place an item in the bottom-right side with gaps in between it and other items
You can't right now without a few tweaks, but once we start accommodating for more options this will definitely be included. We have a certain force called "pull to left" that can be replaced with "pull to top" or just don't pull, let the items be where they are placed, etc.
This was just our use-case, waiting for others to surface and see where this can go.
I did share the HN link on Campfire and colleagues must've jumped to pitch in. It is hard to draw the line but I can see how this sort of behavior should be unrecommended from the start.
Thanks for being so transparent and for spinning this back up. Lesson learned, but I have to ask, are profiles also flagged once they are associated with posts nailed by the vote ring detector?
The main reason we couldn't use gridster was because it's vertical and we wanted a horizontal grid, and that gridster is not very maintained any more (you can read their README.) There are some notable forks, including one here there was an attempt to make the grid work horizontally, but which seemed far from stable and the complexity of the grister code (I read it all) seemed to much of a hustle to contribute (think estimates, etc.) It was definitely the best decision, in the end our GridList lib ended up way lighter than gridster, and we even have a pretty slick collisions implementation (not at all by the book tho, but covering more cases)
There are more small reasons like responsiveness, resizing based on a 1d index, resizing items, etc.
The grid actually works on a principle called "pull to left." It was a UX decision in the end. "Left" is because the grid is designed horizontally (but should be made an option to use the other axis very easily), and "pull" is because we found (after much usability testing) that if you don't have any force in a drag and drop system, items will involuntarily continue to move away from each other as you move them around and collisions occur.
I get where you come from with the jQuery plugin. However, due to many reasons (including time and reducing in-house complexity) jQuery was advantageous for its build-in drag and drop capabilities. But the good part is that we still separated most of our logic from the jQuery plugin, into abstract positioning. The jQuery plugin just transforms grid data into pixels and lays them around. There are many reasons why this is cool. 1. Very fast unit tests ran with Node, 2. Grid positions can be generated server side, etc.
The big increment is having a public repo with tests and documentation to build on. I'm sure there are many other people who could come up with better performance optimizations than me, that's why I worked to make this available
> People's attention is hard to capture, even your colleagues.
True, that's why communicating as much as possible from the title is important, because you don't always expect them to click and "zoom in"
---
Github issues are also essential where I work. We're trying to make them BDD stories, emphasizing most on the customer need and the WHY, followed by what (deliverables) and how (solution)
We went the extra step to have a template that we apply before starting any new issue. I even wrote a Chrome extension a while back, that reads that issue template from an open source repo and applies it in the textarea when you open the /issues/new page on Github. https://github.com/skidding/github-issue-template