To better understand ruby idioms and more generally, what good code feels like, I am looking for good open source projects to explore the code. Any recommendations?
Ideally I would love a few small projects where it’s feasible to wrap your head around the whole codebase.
That’s a good question. I’m interested in that as well…
I’d start by reading the code for simpler gems that you’re using today.
I don’t think you should worry about quality so much. Some will be great, some not as great. It’s good to see some of both and notice how it feels to read and understand code with different levels of quality.
One activity that leveled up my Ruby-fu was reading through just about all of
active_support. It’s pretty much Rails’ junk-drawer, so there’s a lot of different types of code in there for accomplishing different things: string manipulation, date calculations, crazy meta-programming, etc.
I’ve really enjoyed reviewing the source for state_machine.
the book Metaprogramming Ruby has a disucssion of parts of the ActiveRecord codebase and discusses some of the metaprogramming techniques to achieve the functionality. I found it very helpful. Rails gems - I learned a lot from acts_as_tree (in part because it is dated and DHH).