Fisher–Yates shuffle visualization

Learning and science

algorithm visualization

SHOW HN2012

176points
37comments
#100of 1,677 in 2012
Top 6%of 2012 by points

How HN took it

CuriousMostly questions and neutral comments

3 positive, 10 neutral or asking, 2 mixed, 5 critical, out of 20 comments about the project. Thread score 0.00.

Docs: 0 for, 4 againstDesign: 2 for, 0 againstExecution: 0 for, 1 againstPerformance: 1 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Good educational visualization of shuffle methods

    From 3 comments
    • Beautiful. I love the visual demonstrations of the less efficient methods as well. This is a great learning tool for a super common programming problem. One general…
      gerggerg on HN
    • I agree, if the intent is for pedagogical purposes (as in this case), the use of pre-increment and post-increment operators should probably be avoided. A good rule of thumb is…
      barik on HN
    • Thanks for posting this! I just updating my own silly shuffle module (https://github.com/substack/node-deck) to work using the last in-place algorithm for uniform shuffling and I…
      substack on HN
  • Works on iPhone

    From 1 comment
    • Great post, and extra points for visualizations that work on the iPhone.
      mef on HN

Objections

  • Code example uses pre/post-increment operators that hinder readability

    From 2 comments
    • Beautiful. I love the visual demonstrations of the less efficient methods as well. This is a great learning tool for a super common programming problem. One general…
      gerggerg on HN
    • I agree, if the intent is for pedagogical purposes (as in this case), the use of pre-increment and post-increment operators should probably be avoided. A good rule of thumb is…
      barik on HN

Requests

  • Visualizations of other algorithms such as graph search or clustering

    From 2 comments
    • I love the d3.js data visualization framework, which is what Mike Bostock (the creator of d3, as it happens) used the create this page. Well done, Mike. Does anyone have…
      jnbiche on HN
    • Clustering can be visualized quite well and there are several families of algorithms that could be run over similar data, such as k-means clustering or DBSCAN.
      petercooper on HN

Questions

  • Why are the cards criss-crossed in the shuffled deck

    From 2 comments
    • I have a question. Why does the shuffled deck have the cards criss-crossed with its neighbors? I'm not sure what it's suppose to represent.
      iamwil on HN
    • The angle of the lines encodes the value of the card. The lowest-value cards lean left, and the highest-value cards lean right. The in-order deck, therefore, neatly fans from…
      mbostock on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/3464607)