To be entirely fair, jQuery Masonry and jsTree do a lot of the hard work for you. Supply them with some JSON and the defaults are pretty good.
I'm a very "copy/paste/modify" learner. So it was pretty easy to grab the jQuery Masonry examples and fiddle with them until I got the output that I wanted.
I also had done two previous greasemonkey scripts to alter the HN interface, which is where I learned a lot of jQuery fundamentals.