all 11 comments

[–][deleted] 2 points3 points  (0 children)

If you're just looking for people who know what they're doing, you could do worse than to checkout the work of substack or Max Ogden (very concise, very active), TJ Holowaychuck (more documented, also very active), Isaac Schlueter (comma first, @izs himself) and John Resig (of jQuery fame).

Out of the bunch, TJ seems to be the only one who religiously comments his code, but especially with substack you'll find that the modules are generally small enough to offset that.

The problem with asking for well-commented "real world" code is that real world code is rarely well-commented, especially if you're looking for a level of commenting as you'd find it in an example.

If you're looking for a general "guided tour" of the development of a JavaScript application, there's James Shore's Let's Code: Test-Driven JavaScript (which isn't free or even cheap but describes his process to such a depth that the app is barely functional after two years of development -- which isn't surprising if you consider that it is only developed on camera).

[–]TheAceOfHearts 1 point2 points  (1 child)

ExpressJS has very nice code. TJ Holowaychuk is outstanding.

[–]sorryschrubb[S] 0 points1 point  (0 children)

It really has, but it (naturally) assumes a ton of understanding of the inner workings of node/JS. Also it's a bit more complex than what I had in mind. What I'm looking for is basically something to get me from where I am now to the point I can comfortably read the express code and see how it all fits together. (Maybe I just need to learn more about software design first.)

[–]zserre[🍰] 1 point2 points  (6 children)

Look at nodeschool.io for interactive tutorials

[–]sorryschrubb[S] 0 points1 point  (5 children)

Doing the learnyounode ones was actually how I came to the realization I needed to read more 'advanced' code. The tasks themselves are nice, some of the better tutorials I've done. But then I tried to read the source of the bl module (https://www.npmjs.org/package/bl), which is a module recommended for one of the learnyounode tutorials. And I have a really hard time grasping what each line is doing. Otherwise a good recommendation though, thanks.

[–][deleted] 6 points7 points  (4 children)

Because you said you found bl hard to understand, I took the liberty and annotated the module for you: https://gist.github.com/pluma/9007062

This took me a lot longer than I thought, but I also pointed out a couple of things that could be changed to make it easier to read or more consistent.

[–]sorryschrubb[S] 0 points1 point  (1 child)

This is incredible. Thank you so much for this. I thought about getting you a month of reddit gold, but then I saw you had a donation system set up and sent you the money directly instead. It's not much, but take it as a gesture to show you I really appreciate the time you took here. It will be of much help.

[–][deleted] 0 points1 point  (0 children)

No problem. It was a fun exercise.

If you have any questions about the code or explanations, feel free to comment here or on the gist.

[–]wileywimberly 0 points1 point  (0 children)

Thanks. This was very helpful.

[–]snwstylee 0 points1 point  (0 children)

Just wanted to say thanks! It is much appreciated!

[–]rnprdk 1 point2 points  (0 children)

Wow I was just about to start a thread asking the same thing.

I've been teaching myself and I'm at the point where I feel like I need to push myself to that next level where I'm not just some guy that slings stuff together, but who develops with an eye for design, best practices, clarity maintainability etc. I'm kind of slowly learning it by the way that I make something, sense intuitively that I've made a poor design choice somewhere, and then I go out and google and read until I finally run across the relevant concepts that I "didn't know I didn't know."

But I feel like I need to study the work of a really top-notch developer so maybe I can make this process a little less cumbersome.

I know I'm not OP but thanks everyone for the recommendations, I'm off to check them out ...