# Ruby-talk best practices

**URL:** <https://www.ruby-forum.com/t/ruby-talk-best-practices/169988>\
**Category:** Ruby\
**Created:** [June 11, 2009, 12:53am UTC](https://www.ruby-forum.com/t/ruby-talk-best-practices/169988 "2009-06-11T00:53:30Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 11, 2009, 12:53am UTC](https://www.ruby-forum.com/t/ruby-talk-best-practices/169988/1 "2009-06-11T00:53:30Z")

</div>

A bit of self-promotion, but this is a discussion worth having for this  
list. I’ve posted my ideas on ruby-talk best practices over on the Ruby  
Best Practices blog

Comments wanted.

[http://blog.rubybestpractices.com/posts/jamesbritt/and\_your\_Mom\_too.html](http://blog.rubybestpractices.com/posts/jamesbritt/and_your_Mom_too.html)

–  
James B.

[www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys  
[www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
[www.rubystuff.com](http://www.rubystuff.com) - The Ruby Store for Ruby Stuff  
[www.neurogami.com](http://www.neurogami.com) - Smart application development

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 11, 2009, 3:28am UTC](https://www.ruby-forum.com/t/ruby-talk-best-practices/169988/2 "2009-06-11T03:28:35Z")

</div>

On Wed, Jun 10, 2009 at 5:52 PM, James B.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> A bit of self-promotion, but this is a discussion worth having for this  
> list. I’ve posted my ideas on ruby-talk best practices over on the Ruby  
> Best Practices blog
> 
> Comments wanted.
> 
> [http://blog.rubybestpractices.com/posts/jamesbritt/and\_your\_Mom\_too.html](http://blog.rubybestpractices.com/posts/jamesbritt/and_your_Mom_too.html)

Comments here or the other site? In any case, I’ve been waiting for  
someone to clear up those points. I think I broke some of them at  
times, but we’re not entirely on a leash, I hope?

+1 to each of the points

Todd

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 11, 2009, 4:11am UTC](https://www.ruby-forum.com/t/ruby-talk-best-practices/169988/3 "2009-06-11T04:11:53Z")

</div>

On Wed, Jun 10, 2009 at 9:27 PM, Todd B.[removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Comments here or the other site? In any case, I’ve been waiting for  
> someone to clear up those points. I think I broke some of them at  
> times, but we’re not entirely on a leash, I hope?
> 
> +1 to each of the points

I’m sure we’d love the comment juice on the RBP blog, but many of us  
read here, so wherever you feel more comfortable is fine (at least by  
me)

-greg

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 11, 2009, 4:28am UTC](https://www.ruby-forum.com/t/ruby-talk-best-practices/169988/4 "2009-06-11T04:28:50Z")

</div>

Gregory B. wrote:

> > Comments here or the other site? In any case, I’ve been waiting for  
> > someone to clear up those points. I think I broke some of them at  
> > times, but we’re not entirely on a leash, I hope?
> > 
> > +1 to each of the points
> 
> I’m sure we’d love the comment juice on the RBP blog, but many of us  
> read here, so wherever you feel more comfortable is fine (at least by  
> me)

Yeah, I wasn’t looking to boost page hits, just looking to get a  
discussion going, and here works well.

Of course, folks who want to post on the blog are more than welcome. 🙂

–  
James B.

[www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys  
[www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
[www.rubystuff.com](http://www.rubystuff.com) - The Ruby Store for Ruby Stuff  
[www.neurogami.com](http://www.neurogami.com) - Smart application development

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 11, 2009, 6:36am UTC](https://www.ruby-forum.com/t/ruby-talk-best-practices/169988/5 "2009-06-11T06:36:20Z")

</div>

On Jun 10, 6:52 pm, James B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> A bit of self-promotion, but this is a discussion worth having for this  
> list. I’ve posted my ideas on ruby-talk best practices over on the Ruby  
> Best Practices blog
> 
> Comments wanted.
> 
> [http://blog.rubybestpractices.com/posts/jamesbritt/and\_your\_Mom\_too.html](http://blog.rubybestpractices.com/posts/jamesbritt/and_your_Mom_too.html)

Hey,

Is the “And your Mom, too” an actual quote from a post? I can only  
imagine such a thread would be rather entertaining 😉

-T

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 11, 2009, 7:38am UTC](https://www.ruby-forum.com/t/ruby-talk-best-practices/169988/6 "2009-06-11T07:38:23Z")

</div>

trans wrote:

> Hey,
> 
> Is the “And your Mom, too” an actual quote from a post? I can only  
> imagine such a thread would be rather entertaining 😉

Sadly (depending on your sense of humor), no. It’s meant as a broad (ha  
ha) example of cheap snipes that are occasionally posted. I had some  
others in mind, but realized they were sure to be offensive. 🙂

–  
James B.

[www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys  
[www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
[www.rubystuff.com](http://www.rubystuff.com) - The Ruby Store for Ruby Stuff  
[www.neurogami.com](http://www.neurogami.com) - Smart application development

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 11, 2009, 7:01pm UTC](https://www.ruby-forum.com/t/ruby-talk-best-practices/169988/7 "2009-06-11T19:01:24Z")

</div>

On 10 Jun 2009, at 23:52, James B. wrote:

> A bit of self-promotion, but this is a discussion worth having for  
> this list. I’ve posted my ideas on ruby-talk best practices over on  
> the Ruby Best Practices blog
> 
> Comments wanted.
> 
> [http://blog.rubybestpractices.com/posts/jamesbritt/and\_your\_Mom\_too.html](http://blog.rubybestpractices.com/posts/jamesbritt/and_your_Mom_too.html)

A really nice write-up of the common sense we all sometimes ignore.  
The emphasis on MINASWAN is particularly welcome.

Ellie

## Eleanor McHugh Games With Brains [http://slides.games-with-brains.net](http://slides.games-with-brains.net)

raise ArgumentError unless @reality.responds\_to? :reason

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 12, 2009, 12:25am UTC](https://www.ruby-forum.com/t/ruby-talk-best-practices/169988/8 "2009-06-12T00:25:03Z")

</div>

> A really nice write-up of the common sense we all sometimes ignore.  
> The emphasis on MINASWAN is particularly welcome.

Haha I recall some comment on youtube when Matz gave a keynote lecture.

And the comments field was put with “matz is like buddha, people around  
him start to smile for no obvious reason”.

Anyway, I rarely get too emotional over written text at all. I have seen  
too many heat discussions on various boards, and the worst was when some  
reallife friends of mine - we shared a common forum for various  
interests hobbies etc… - got into a quarrel. (I was inactive during  
that time on that forum, due to some other problems, as the time in  
general was not that easy).

To cut a long story short - people should really not get too emotional  
over written text at all. People should really never get too emotional  
over written text.

Now to a few points I would like to make about the “Ruby best  
practices”:

- I think ruby as community is in general very open-minded for new  
ideas, but at the same time ruby as language is quite rigid in concepts.  
I.e. it can take a long time before something “changes”. Everyone has  
another suggestion, and one has to keep things together under one hood  
in order to create _and_ sustain an elegant language.

I think it is also good that more and more people can start coding. It  
means that coding does not remain a niche for C gurus only; it also  
means that “dumber” people who only use scripting languages will express  
their visions and ideas, and the more of these the better IMHO. An idea  
is rarely bad. Often it can be used provocatively to generate a new idea  
(or pave way for creating new ideas.)  
I.e. to use lateral thinking to come to new conclusions, or purposely  
take up a new point of view. (Of course, taking a new point of view  
during a heated discussion is difficult - who wants to “give back” at  
all to arguments if one can use his intellect to attack those arguments,  
or the person who presented them instead?)

- As far as changes to ruby are concerned… if i would have the  
knowledge and time, I would redo ruby. I would simplify it a lot. That  
would be my first goal. Yes, some of you can not believe this, but I  
think ruby is not simple enough. 🙂 Another change I would make would be  
to extend documentation a lot. I mean, I think if stdlib components have  
a documentation that is lacking, I would throw it out (or improve on  
that documentation), but it really is annoying to have a lacking  
documentation…

Also, I guess I would reevaluate rubygems so that projects like  
[http://hellorip.com/about.html](http://hellorip.com/about.html) would never have a “need” to be created.  
I would also try to unify for all scripting languages, so that they can  
focus on SHARING their ideas, no matter the underlying code (i.e. which  
language is used). It strikes me as silly that some languages have cpan  
pears etc… and others will only have that when someone ports it. 😕

- About “Don’t top-post”

I agree on that. It is annoying if one reads from top-to-the-bottom.

- ‘How do I do foo?â€, but first apply some due diligence. Use Google.  
Use [ruby-doc.org](http://ruby-doc.org)’

I disagree on that. I think if people want to know something, they  
should ask. I dont think it helps to tell people to go away and learn  
ruby first, before asking questions. Other than that I agree with the  
rest of what was written there.

- Be specific

Agreed completely.

- Don’t threadjack.

Not sure. I think it depends on the definition of threadhijacking.  
Personally I think as long as the DISCUSSION FLOW is still going on, it  
is totally fine to “divert” a bit. It really depends on the issue at  
hand as well.

To me it rather sounds as if someone is trying to impose his point of  
view onto me, as if I am required to follow a certain way to “discuss”  
something.

People should really be freely able to discuss it, and if the thread  
moves in a wrong direction, people can point it out easily. I really  
dont think this should be part of “best practise”.

- Repetition is not an argument

Not repetition, but whatever was written may very well be valid, even if  
someone disagrees. People will rarely change their opinion anyway.  
I really dont see the problem here. People can have different opinions  
all the time. They usually dont try to _convince_ others either - this  
is futile - but they want to make strong points. It is as if one is  
self-reflecting about his/her own arguments…

- Watch for perma-threads

Disagree here. If I would always have to dig through the whole list, I  
would never even bother. It would just be too much work.

- Walk the walk

This is problematic. I agree partially, but since facets was mentioned:  
I think the idea of facets is fine, but it should be in stdlib, and if  
it is not I dont really see a need to use something like facets. I just  
bundle along the changes I want to have into my app anyway. (The  
situation would be different if facets would be an official “standard”).

“Then explain why it needs to be added to the language rather than used  
as a gem.”

This is futile. There were many threads about this or that addition,  
most were rejected, and this is EXACTLY why facets was started in the  
first place (and to not have too many different projects face the same  
dilemma)

And I also think proposals to the ruby language in most situations are  
just a waste of time for anyone who does it. Maybe I am wrong here, but  
I would be interested to see solid numbers on that, i.e. how many  
proposed something, and how much was rejected/accepted. I think the  
number of rejections will be largely higher - so much that I would say  
it is futile… 😉

My experience here is that, given a large pool of people, there will  
ALWAYS be a group who absolutely HATE something. (This is the cool thing  
in ruby btw, because it is so flexible that it doesnt really matter.  
Just extend a class in ruby with your changes, and thats it.)

Anyway, I guess anything that helps newcomers is a good thing.  
Personally I would focus much more on the “do’s” than on the “don’ts”. I  
found it easier to focus on what is “good”, than what is a “strict rule  
you should never break” which could invoke happy trolls trolling all  
over the place with asking pseudo-trolling questions.

---

<div class="post-metadata">

**Author:** ![byrnejb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/d2c977/32.png) [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Post date:** [June 12, 2009, 8:35am UTC](https://www.ruby-forum.com/t/ruby-talk-best-practices/169988/9 "2009-06-12T08:35:39Z")

</div>

Marc H. wrote:

> > A really nice write-up of the common sense we all sometimes ignore.  
> > The emphasis on MINASWAN is particularly welcome.

> Now to a few points I would like to make about the “Ruby best  
> practices”:

…

> - As far as changes to ruby are concerned… if i would have the  
> knowledge and time, I would redo ruby. I would simplify it a lot. That  
> would be my first goal. Yes, some of you can not believe this, but I  
> think ruby is not simple enough. 🙂 Another change I would make would be  
> to extend documentation a lot. I mean, I think if stdlib components have  
> a documentation that is lacking, I would throw it out (or improve on  
> that documentation), but it really is annoying to have a lacking  
> documentation…

A number of people would agree with you on both points.

> 

> - ‘How do I do foo?â€, but first apply some due diligence. Use Google.  
> Use [ruby-doc.org](http://ruby-doc.org)’
> 
> I disagree on that. I think if people want to know something, they  
> should ask. I dont think it helps to tell people to go away and learn  
> ruby first, before asking questions. Other than that I agree with the  
> rest of what was written there.

If someone really does not know even where to begin to do something,  
then fine. But there are many cases where Google really does turn up  
the answer right away. Such as, How do I reverse a string?

I don’t want to discourage anyone from asking questions, but there are  
times when you get the feeling the poster really just can’t be bothered  
doing anything more than posting to the list. And, like it or not,  
there will be people who will react poorly to such a post, so it is in  
the newbie’s interest to at least understand how some questions may be  
received.

> is totally fine to “divert” a bit. It really depends on the issue at  
> hand as well.
> 
> To me it rather sounds as if someone is trying to impose his point of  
> view onto me, as if I am required to follow a certain way to “discuss”  
> something.

> People should really be freely able to discuss it, and if the thread  
> moves in a wrong direction, people can point it out easily. I really  
> dont think this should be part of “best practise”.

Well, suppose I replied to you post by deleting all the text and then  
asking, “How do I reverse a string?” And others reply with answers to  
that question. It ends up making it harder to find and follow  
information. I don’t seem meandering topics in long threads as  
threadjacking; it’s the out-of-the-blue topic shift that’s troublesome.

> - Repetition is not an argument
> 
> Not repetition, but whatever was written may very well be valid, even if  
> someone disagrees. People will rarely change their opinion anyway.  
> I really dont see the problem here. People can have different opinions  
> all the time. They usually dont try to _convince_ others either - this  
> is futile - but they want to make strong points. It is as if one is  
> self-reflecting about his/her own arguments…

Sometimes people do care if others change there mind (for example,  
convincing matz to make a language change), and they should realize that  
if a particular phrasing or example isn’t working, then something else  
is needed. Different phrasing, a new example, some other analogy. (But  
not ALL CAPS. 🙂 )

> - Watch for perma-threads
> 
> Disagree here. If I would always have to dig through the whole list, I  
> would never even bother. It would just be too much work.

Would you rather _others_ do the work of answering questions that have  
been answered before? “Dig through the whole” list makes it sound like  
you are manually sorting through stacks of papers. There are  
searchable archives. I gave links. It doesn’t get any easier.

Plus, people who show that they’ve made some effort to first help  
themselves will gain more goodwill from others, and get more and better  
responses.

> as a gem."
> 
> This is futile. There were many threads about this or that addition,  
> most were rejected, and this is EXACTLY why facets was started in the  
> first place (and to not have too many different projects face the same  
> dilemma)

That may prove the point: if something can be coded up in plain ruby,  
then why make the std-lib even bigger than it already is?

> And I also think proposals to the ruby language in most situations are  
> just a waste of time for anyone who does it. Maybe I am wrong here, but  
> I would be interested to see solid numbers on that, i.e. how many  
> proposed something, and how much was rejected/accepted. I think the  
> number of rejections will be largely higher - so much that I would say  
> it is futile… 😉

Rejections may be high, but not futile. ruby-core may have posts  
regarding accepted changes. I think the rcr site used to have stats on  
that. It _has_ happened.

> over the place with asking pseudo-trolling questions.  
> I don’t think I claimed anything was a strict rule. They’re guidelines.  
> Suggestions for civil discussion, and open to civil debate.

Having people be aware of these things is ultimately the goal, even when  
we disagree on the details.

–  
James B.

[www.jamesbritt.com](http://www.jamesbritt.com) - Playing with Better Toys  
[www.ruby-doc.org](http://www.ruby-doc.org) - Ruby Help & Documentation  
[www.rubystuff.com](http://www.rubystuff.com) - The Ruby Store for Ruby Stuff  
[www.neurogami.com](http://www.neurogami.com) - Smart application development
