News for hackers. Stuff that matters.
Re:JavaScript Patterns Collection by Cthulhu_ on Monday March 18, 2013 @05:51AM (#5393273)
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.

Re:JavaScript Patterns Collection by showsover on Monday March 18, 2013 @10:54AM (#5394517)
>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.

Re:JavaScript Patterns Collection by klibertp on Monday March 18, 2013 @12:38PM (#5395288)
> Tabs for indentation, spaces for alignment.

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

Re:JavaScript Patterns Collection by wyqueshocec on Monday March 18, 2013 @02:02PM (#5395959)
Is there a way to change the tab width on GitHub's code viewer?
Re:JavaScript Patterns Collection by themstheones on Monday March 18, 2013 @10:55AM (#5394525)
Two space indentation is great if you have a CGA monitor and don't have much horizontal room.
Re:JavaScript Patterns Collection by wyqueshocec on Monday March 18, 2013 @02:02PM (#5395955)
Also great for viewing the code on GitHub.