Live data from Hacker News

Reverse-Engineering Xkcd's 'Frequency'

notebooks.jsvine.com

41–50 of 55 posts

Re: Reverse-Engineering Xkcd's 'Frequency'

#41
post #17
post #4

Earlier quoted context omitted.

It would be nice to have Show Code at the top, along with a note that some of the code has been hidden. I like seeing code examples as I'm reading through.

I'm the guy who built that, and I agree. I tinkered with having another "Show Code" button at the top, but my attempts looked bulky and distracting. Still trying to figure out a better way. In the meantime, pull requests quite welcome: https://github.com/jsvine/reporter

Maybe something more discreet than a large button at the beginning, like:

  

(Code samples are hidden. Show code samples)

Re: Reverse-Engineering Xkcd's 'Frequency'

#44
post #8

Not super related to the content, but I love the "Show Code" button at the bottom of the article. So often sites either show code inline and break up my reading, or just dump the whole thing into a github repo, which loses context. That button is awesome, because I can read the whole thing to understand the problem, then review the code the next time through with better context. Awesome!

I agree that having a "Show code" button only at the end prevents disrupting the reading flow. In terms of "code with explanation" layout, I really like todos.js' approach: http://backbonejs.org/docs/todos.html It also works with images: http://www.ifixit.com/Teardown/Mac+Pro+Late+2013+Teardown/20... Most layouts nowadays fail to take advantage of the horizontal space available. It's just 2 colums in the end, but it…

The todos.js one was generated by a tool called Docco, created by Jeremy Ashkenas (creator of Backbone, Underscore, and CoffeeScript). I agree that it looks really good and more people should use it for their projects!

http://jashkenas.github.io/docco/

Re: Reverse-Engineering Xkcd's 'Frequency'

#45
post #8

Earlier quoted context omitted.

I agree that having a "Show code" button only at the end prevents disrupting the reading flow. In terms of "code with explanation" layout, I really like todos.js' approach: http://backbonejs.org/docs/todos.html It also works with images: http://www.ifixit.com/Teardown/Mac+Pro+Late+2013+Teardown/20... Most layouts nowadays fail to take advantage of the horizontal space available. It's just 2 colums in the end, but it…

The todos.js one was generated by a tool called Docco, created by Jeremy Ashkenas (creator of Backbone, Underscore, and CoffeeScript). I agree that it looks really good and more people should use it for their projects! http://jashkenas.github.io/docco/

>created by Jeremy Ashkenas (creator of Backbone, Underscore, and CoffeeScript)

Just out of curiosity, why did you include that? Do people make judgements about tools based on the person who wrote it?

Re: Reverse-Engineering Xkcd's 'Frequency'

#46
What I found interesting was the format of the gifs themselves. They were mostly or completely uncompressed, totaling 8MB. I can only think of one possible reason to do this, which would be to take advantage of HTTP compression to go inter-frame instead of using the builtin intra-frame that gifs have (.5MB vs 4MB). But HTTP compression was turned off too.

Re: Reverse-Engineering Xkcd's 'Frequency'

#47
post #45

Earlier quoted context omitted.

The todos.js one was generated by a tool called Docco, created by Jeremy Ashkenas (creator of Backbone, Underscore, and CoffeeScript). I agree that it looks really good and more people should use it for their projects! http://jashkenas.github.io/docco/

>created by Jeremy Ashkenas (creator of Backbone, Underscore, and CoffeeScript) Just out of curiosity, why did you include that? Do people make judgements about tools based on the person who wrote it?

I'd say yes. If you took the time to independently evaluate every tool that was ever produced, you wouldn't have time for anything else. So instead, people rely on crude, biased, but effective heuristics, the author's past achievements being one of them.

It's the same thing with novel authors - I'm much more likely to purchase a book by Stephen King than an unknown author's debut album if that's all I know about the books.

Re: Reverse-Engineering Xkcd's 'Frequency'

#49
post #45

Earlier quoted context omitted.

The todos.js one was generated by a tool called Docco, created by Jeremy Ashkenas (creator of Backbone, Underscore, and CoffeeScript). I agree that it looks really good and more people should use it for their projects! http://jashkenas.github.io/docco/

>created by Jeremy Ashkenas (creator of Backbone, Underscore, and CoffeeScript) Just out of curiosity, why did you include that? Do people make judgements about tools based on the person who wrote it?

Actually I was originally going to add "so that is why you will see it frequently on projects related to those technologies," just to give some background and link it all together (e.g. the cited example is hosted on the backbone site).

But yeah, it also gives it some star power and instant credibility, and I wanted to highlight jashkenas for his significant contributions. (As a side note I don't currently use any of them, I prefer Angular and vanilla JS syntax.)

Post reply on HN