Ruby-talk best practices

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

···

--
James Britt

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.neurogami.com - Smart application development

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

···

On Wed, Jun 10, 2009 at 5:52 PM, James Britt<james.britt@gmail.com> 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

Hey,

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

-T

···

On Jun 10, 6:52 pm, James Britt <james.br...@gmail.com> 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

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

···

On 10 Jun 2009, at 23:52, James Britt 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

----
raise ArgumentError unless @reality.responds_to? :reason

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

···

On Wed, Jun 10, 2009 at 9:27 PM, Todd Benson<caduceass@gmail.com> wrote:

On Wed, Jun 10, 2009 at 5:52 PM, James Britt<james.britt@gmail.com> 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

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

trans 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

Hey,

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

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. :slight_smile:

···

On Jun 10, 6:52 pm, James Britt <james.br...@gmail.com> wrote:

--
James Britt

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.neurogami.com - Smart application development

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. :slight_smile: 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 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. :confused:

- 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'

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... :wink:

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.

···

--
Posted via http://www.ruby-forum.com/\.

Gregory Brown wrote:

···

On Wed, Jun 10, 2009 at 9:27 PM, Todd Benson<caduceass@gmail.com> wrote:

On Wed, Jun 10, 2009 at 5:52 PM, James Britt<james.britt@gmail.com> 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

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. :slight_smile:

--
James Britt

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.neurogami.com - Smart application development

Marc Heiler 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. :slight_smile: 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'

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.

- 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".

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. :slight_smile: )

- 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.

- 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)

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... :wink:

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.

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.

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 Britt

www.jamesbritt.com - Playing with Better Toys
www.ruby-doc.org - Ruby Help & Documentation
www.rubystuff.com - The Ruby Store for Ruby Stuff
www.neurogami.com - Smart application development