From: John Gabriele Date: 2006-06-03T02:53:23+09:00 Subject: Re: Where can one find examples of masterful Ruby code? On 6/1/06, James Britt wrote: > Alder Green wrote: > > On 6/1/06, Tyler Prete wrote: > > > >> Hopefully you'll get more helpful answers to this question from someone a > >> little more knowledgable, but a few examples of fantastic code (although > >> often complicated) are the ruby library, rails, and ruby quiz. > > > > > > Being a Rails programmer, I tried reading some of Rails' code and it > > looks like you have to commit to reading a large portion of it to gain > > any understanding. At least the core stuff that I sampled > > (ActiveRecord, ActionPack) looks very tightly knit together. A guide > > about approaching the Rails codebase might be very helpful, and > > beneficial considering the importance of codebase accessibility in an > > OSS project. Maybe I should raise this issue in the Rails ML. > > > > > Semi-rhetorical questions: If you are not already well-versed in Ruby, > how do you know you are reading masterful code? > > If you are reading masterful code, can one appreciate what makes it > masterful without a firm knowledge of Ruby? > > Is the definition of "masterful" conditional? If so, on what? I think you might have your tongue in your cheek asking that last one, but I'll answer that it's only masterful if it's well documented. That is: if other devs can't jump in and easily behold your mastery, than what sort of a master are you? What good is pulling of a daring coup in your code if no one sees why (or if it takes way too long to figure out how) you did it? ---John