News for hackers. Stuff that matters.

Ask HN: Small and good Ruby and Javascript Source to study?

Recently I started learning Ruby and JavaScript and currently I am familiar with the language syntax and semantics on the basic level.

Learning by doing is the best way as they say but I have mostly got burned by taking this strategy. Every time I will start with great enthusiasm and within 1 month I will pile up a code base which I do not feel like reading or refactoring.

This time around I want to study good code and pattern they use to keep the number of lines and complexity low. I am also planning practicing syntax on paper and analyse it offline instead of just jumping in to code.

Assuming I do not have deep CS knowledge, is there a small enough code base for Ruby and JavaScript project which I can study and understand in a month's time?

ps: I can commit 1-2 hours every day towards this goal.

( 3 comments | 2 points | on HN )
Re:Ask HN: Small and good Ruby and Javascript Source to study? by timruffles on Monday July 18, 2011 @07:05AM (#2775798)
I'd suggest Backbone.js for Javascript; it's well written, compact (~1k with comments) and well explained.
Re:Ask HN: Small and good Ruby and Javascript Source to study? by drieddust on Monday July 18, 2011 @07:11AM (#2775813)
thank 10 pages of code is just enough I can read in a month's time.

Does backbone assumes any CS knowledge like Data structures etc?

Re:Ask HN: Small and good Ruby and Javascript Source to study? by OneWhoFrogs on Tuesday July 19, 2011 @05:49PM (#2783264)
Here's a very nice Ruby book, available for free as a PDF:

http://rubybestpractices.com/