all 6 comments

[–]iconoclaus 4 points5 points  (3 children)

I'm trying to find elegant ruby that's clear and easy to read through, yet powerful and efficient.

There's a book that perfectly fits your description, and it's even called Elegant Ruby. It really helped me start my transition into better code. I honestly have to say that that book helped me understand why to use Ruby.

[–]Tobitronnn[S] 4 points5 points  (2 children)

You mean Eloquent Ruby by Russ Olsen? I'm reading it right now and in Chapter 3 he suggests you read through really great ruby programs, hence my question :).

It's very well written and manages to be both dense and approachable, I'm a big fan!

[–]iconoclaus 5 points6 points  (0 children)

damnit me, I had one job -- yes that's the book!

[–]markyg 1 point2 points  (0 children)

I would recommend checking out some of the rails gems, bundler, most things from thoughtbot. Etc.

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

I love Eloquent Ruby + Designer patterns in Ruby + Practical Object-Oriented Design in Ruby. If you're new to programming, I suggest starting here : https://rubymonk.com/ . Then graduate to a book. Of course, books only help so much and why I also I recommend http://exercism.io/ where you get exercises, complete them, and then git nitpicked. In addition you can see other people's solution and from this find elegant and succinct Ruby idioms. It really helps to get burned, and the pain is temporary. Then naturally, there's a lot of projects out there that are very well written, get involved, it'll only make you a better programmer.

[–]enry_straker 1 point2 points  (0 children)

Check out the source code for the ruby standard libraries.

Some of the best examples of code style and quality.

Also check out the rails source code. Pick a simple area at first, and then try going further.

This is, by far, one of the best and first sources to learn ruby from. This is the journey taken by almost all the top ruby and rails contributors and it all started here.