Hacker News new | past | comments | ask | show | jobs | submit login

I'm going to be critical and say that I don't like the format of this reference; each entry in the table of contents links to a source file in github (opening in a new window/tab) instead of being, for example, a collapsed code box in the same tab.

Second, they're not .js files, but .html files with (in my opinion) obsolete / unnecessary html boilerplate surrounding it. If it's simply a page to demonstrate / display JS patterns, they should be plain .js files, I think; from what I've seen, those should run equally well in a browser and node.js.

I'm also not a fan of tab-based indentation, the examples could be a lot more compact (and readable) horizontally if using two-space indentation instead of tabs.




>I'm also not a fan of tab-based indentation, the examples could be a lot more compact (and readable) horizontally if using two-space indentation instead of tabs.

That's the forte of using tabs. Change your display width of tabs to 2 spaces instead of 4.

Tabs for indentation, spaces for alignment.


> Tabs for indentation, spaces for alignment.

And complete mess when someone other than you opens your file :)


Is there a way to change the tab width on GitHub's code viewer?


Two space indentation is great if you have a CGA monitor and don't have much horizontal room.


Also great for viewing the code on GitHub.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: