Ruby coding guidelines?


#1

Is there in the Ruby community anything like “ruby coding convention”?

Google returns two interesting links:

http://pub.cozmixng.org/~the-rwiki/rw-cgi.rb?cmd=view;name=RubyCodingConvention

Are they “authoritative” for some meaning of the word? :slight_smile:

Many thanks in advance,
Cheers.


#2

On 1/21/07, Stefano Z. removed_email_address@domain.invalid wrote:


Stefano Z. -*- Computer Science PhD student @ Uny Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it} -%- http://www.bononia.it/zack/
(15:56:48) Zack: e la demo dema ? /\ All one has to do is hit the
(15:57:15) Bac: no, la demo scema / right keys at the right time

There is no official/authoritative Style Sheet/Coding Conventions but
those two put together are what most of the community uses


#3

Hi –

On Mon, 22 Jan 2007, Chris C. wrote:

There is no official/authoritative Style Sheet/Coding Conventions but
those two put together are what most of the community uses

I’d also point to the standard library (at least most of it :slight_smile: as a
good source of examples of traditional Ruby style.

David


#4

On Mon, Jan 22, 2007 at 12:33:31AM +0900, removed_email_address@domain.invalid wrote:

I’d also point to the standard library (at least most of it :slight_smile: as a
good source of examples of traditional Ruby style.

That’s indeed what I usually do, but a visible document on the net would
be far more reassuring for newbies willing to following the community
best-practices :slight_smile:


#5

Hi –

On Mon, 22 Jan 2007, Stefano Z. wrote:

On Mon, Jan 22, 2007 at 12:33:31AM +0900, removed_email_address@domain.invalid wrote:

I’d also point to the standard library (at least most of it :slight_smile: as a
good source of examples of traditional Ruby style.

That’s indeed what I usually do, but a visible document on the net would
be far more reassuring for newbies willing to following the community
best-practices :slight_smile:

Like I said, “also” :slight_smile:

David


#6

Chris C. wrote:

There is no official/authoritative Style Sheet/Coding Conventions but
those two put together are what most of the community uses

There is also style guide on the RubyGarden wiki
(http://www.rubygarden.org/ruby) , but the wiki doesn’t seem to be
responding right now.


James B.

“Programs must be written for people to read, and only incidentally
for machines to execute.”

  • H. Abelson and G. Sussman
    (in "The Structure and Interpretation of Computer Programs)