Skip to content
HomeVideosBooksBlogs
AllTop postsTopics
Podcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    J

    Jamis Buck

    weblog.jamisbuck.org · Personal blog · on HN since 2007

    Jamis Buck, a programmer, writes about software and is best known for his series on maze-generation algorithms with demos.

    Visit blogHN submissions
    ProgrammingMath
    What HN says

    HN commenters point to it as a great, thorough resource on maze generation, with posts on each algorithm and a recap.

    Stats for nerds
    110HN people shared it
    83linked in comments
    1.8Kstory points
    Oct 2025last shared
    2009people per year2025

    Top posts on HN

    1. 1
      "Algorithm" is not a four letter word
      5 people · 444 points · first shared 2011 · 65 comments on HN
    2. 2
      Don't Assume It's Difficult Until It Is
      1 person · 153 points · first shared 2016 · 29 comments on HN
    3. 3
      The Dynamic Def – abusing Ruby's def statement
      2 people · 142 points · first shared 2015 · 86 comments on HN
    4. 4
      Maze Algorithms (2011)
      14 people · 138 points · first shared 2011 · 22 comments on HN
    5. 5
      Maze Generation: Wilson's algorithm
      2 people · 101 points · first shared 2011 · 11 comments on HN
    6. 6
      Ideas are Cheap
      2 people · 98 points · first shared 2015 · 63 comments on HN
    7. 7
      Generating random mazes with the Growing Tree algorithm (w/ Javascript demo)
      1 person · 86 points · first shared 2011 · 6 comments on HN
    8. 8
      Maze Generation: Eller's Algorithm
      8 people · 85 points · first shared 2010 · 9 comments on HN
    9. 9
      Coming home to Vim
      5 people · 66 points · first shared 2008 · 34 comments on HN
    10. 10
      Maze-generation algorithms, with JS demos
      18 people · 62 points · first shared 2011 · 9 comments on HN

    What HN people wrote when they linked it

    • JachApr 2012

      > Not only do they help the student with writing code, the introduce important parts of programming as well as Big-O notation.

      Are sorting algos the best methods for helping students write code and learning about Big-O? I don't think so. Learning the fundamental data structures are a lot more useful for that purpose, I think. Of the standard crop, I think the binary search is a good algorithm to teach (though one must note its historical implementation problems in languages with fixed int sizes), and if you're going to do sorting then quicksort + insertion sort when N < 16 wouldn't be awful. At least mention the language's built-in sort so that open source projects like gnu flex don't inherit a DIY sorting function in the code (in their case, the evil bubble sort which should never be taught).

      Instead of the cast of characters for sorting algos, I'd rather see something like this cast of maze generation algos: http://weblog.jamisbuck.org/2011/2/7/maze-generation-algorithm-recap I think they would accomplish your goals better, plus they have shininess built-in.

      >…"Lets learn Unity3D" course in front of me, I would never ever attend that university.

      But you would probably still be doing programming and CS elsewhere. You're already set. This post is about trying to attract people into programming at the HS or college level who otherwise wouldn't be. But from the other comments it seems like I might agree with you specifically on Unity3D; I haven't used it myself but it…

    • livremDec 2023

      Guess triangular and hexagonal grids are somewhat rare, but not exactly unknown. I remember the Programming Clojure book included a maze-generator that was shown for both square and hex grids (and could probably be easily modified for triangles as well?).

      Surprisingly the linked generator does not seem to have any choice of different maze algorithms? I guess it only uses one of the perfect algorithms then, meaning all possible mazes have equal probability. Those tend to be pretty boring. I think the biased algorithms often create more interesting mazes.

      (EDIT: I see after reading some other comments here and the Help page that the E and R values can be set to create more biased mazes which sounds useful.)

      Jamis Buck's Maze algorithm page is a great resource and the book he wrote about programming mazes is even better. It has nice visualizations of how the biases from different not perfect algorithm creates different patterns of mazes.

      https://www.jamisbuck.org/mazes/

      Implementing and visualizing different maze algorithms is probably my favorite kind of exercise when trying some new programming language (or things like game frameworks/libraries). Most of the algorithms are very easy, so there are no distractions from trying to get the logic right, but there are still some data-structures to play with and a bit more weight than Hello World.

    • YoricFeb 2020

      Well, the big one is GC.

      Here are a few others:

      - both polymorphic variants and GADTs are extremely powerful mechanisms to let you keep track of invariants, in a manner that cannot be replicated readably in Rust so far;

      - OCaml's pattern-matching is a bit more flexible than Rust's ;

      - (thanks to the GC) OCaml's closures are much more flexible than Rust closures;

      - I guess OCaml's blindingly fast exceptions can be useful for some algorithms, although I haven't really experienced the need for them myself.

      Again, that's not to say that Rust doesn't have great stuff for it (affine types 4eva!) or that OCaml doesn't have its own limitations – Rust is currently my main language and I do not regret it.

      But there are some algorithms that I really don't want to write in Rust. Recently, for instance, I stumbled upon this: http://weblog.jamisbuck.org/2010/12/29/maze-generation-eller-s-algorithm . Trivial algorithm, trivial to write in OCaml, feasible but much less straightforward in Rust.

    • 100kJul 2014

      I wasn't at RubyConf 2004 (back then I thought Ruby was some weird Perl-ish language from Japan, not worth my attention) but for my RailsConf talk I dug up some old blog posts about what it was like when DDH first spoke about Rails at that conference.

      Jamis Buck was there: http://weblog.jamisbuck.org/2004/10/2/rubyconf-day-two

      Francis Hwang: http://fhwang.net/2004/10/03/RubyConf-2004-Day-2

      It's amazing how few people were there and how marginal Ruby was in 2004.

    • DanielRibeiroFeb 2011

      Great point. This presentation showed how easy it can be to implement DI in ruby: http://onestepback.org/articles/depinj/index.html

      Dynamic languages don't suffer many of the overheads with using DI. So do those with Mixins (see the Scala's Cake pattern for more on this http://jonasboner.com/2008/10/06/real-world-scala-dependency-injection-di.html)

      This blog post says more about it: http://weblog.jamisbuck.org/2008/11/9/legos-play-doh-and-programming.

    • jschulenklopperMay 2015

      For a great collection of maze generation algorithms, see the blog of Jamis Buck. On http://weblog.jamisbuck.org/2011/2/7/maze-generation-algorithm-recap.html he recaps the algorithms discussed in earlier posts, and he's publishing a book on the topic: Maze for Programmers. It's currently in beta on the Pragmatic Bookshelf: https://pragprog.com/book/jbmaze/mazes-for-programmers. Can't wait for the hardcover book, currently planned for September 2015.

    Related

    Aldo Cortesicorte.si88 people

    Visualizing binaries with space-filling curves

    Aldo Cortesi
    Personal · last shared 2026
    DataGeneticsdatagenetics.com213 people

    Analysis of bank PIN numbers

    DataGenetics
    Personal · last shared 2025
    James Coglanblog.jcoglan.com93 people

    The Myers diff algorithm: part 1

    James Coglan
    Personal · last shared 2026
    Keith Schwarzkeithschwarz.com50 people

    Darts, Dice, and Coins: A beautiful article on a beautiful algorithm

    Keith Schwarz
    Personal · last shared 2026
    Amit Pateltheory.stanford.edu/~amitp28 people

    Introduction to A* (1997)

    Amit Patel
    Personal · last shared 2025
    Forrest Smithforrestthewoods.com57 people

    Simpson’s Paradox (2016)

    Forrest Smith
    Personal · last shared 2026
    Jeremy Kunjeremykun.com194 people

    A Programmer's Introduction to Mathematics

    Jeremy Kun
    Personal · last shared 2026
    Charles Hbfshbfs.wordpress.com34 people

    Run, Python, Run

    Charles Hbfs
    Personal · last shared 2026