[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

ruby-talk best practices

James Britt

6/10/2009 10:53:00 PM

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


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

22 Answers

Todd Benson

6/11/2009 1:28:00 AM

0

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. =A0I've posted my ideas on ruby-talk best practices over on the Rub=
y
> Best Practices blog
>
> Comments wanted.
>
> http://blog.rubybestpractices.com/posts/jamesbritt/and_your_Mo...


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

Gregory Brown

6/11/2009 2:11:00 AM

0

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. =A0I've posted my ideas on ruby-talk best practices over on the Ru=
by
>> Best Practices blog
>>
>> Comments wanted.
>>
>> http://blog.rubybestpractices.com/posts/jamesbritt/and_your_Mo...
>
>
> Comments here or the other site? =A0In any case, I've been waiting for
> someone to clear up those points. =A0I 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

James Britt

6/11/2009 2:28:00 AM

0

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

Trans

6/11/2009 4:36:00 AM

0



On Jun 10, 6:52=A0pm, James Britt <james.br...@gmail.com> wrote:
> A bit of self-promotion, but this is a discussion worth having for this
> list. =A0I've posted my ideas on ruby-talk best practices over on the Rub=
y
> Best Practices blog
>
> Comments wanted.
>
> http://blog.rubybestpractices.com/posts/jamesbritt/and_your_Mo...

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

James Britt

6/11/2009 5:38:00 AM

0

trans wrote:
>
> 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_Mo...
>
> 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 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

Eleanor McHugh

6/11/2009 5:00:00 PM

0

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

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-...
----
raise ArgumentError unless @reality.responds_to? :reason


Marc Heiler

6/11/2009 10:25:00 PM

0

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

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.
--
Posted via http://www.ruby-....

James Britt

6/12/2009 6:35:00 AM

0

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

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

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

Billy

10/19/2011 4:13:00 PM

0

On Oct 19, 11:53 am, Fattuchus <fattuc...@yahoo.com> wrote:
> On Oct 19, 10:04 am, moonpie <mr_rc_moon...@yahoo.com> wrote:
>
> > On Wed, 19 Oct 2011 01:51:54 -0700 (PDT), Fattuchus
>
> > <fattuc...@yahoo.com> wrote:
>
> > >With John dead, much of the negative fame became positive.  She was in
> > >the spotlight, and IMO, she loves it.
>
> > I cannot, for the life of me, understand this fixation with Yoko.
>
> > When you listen to the Beatles, when you listen to Lennon sing and
> > play guitar, do you think about Yoko?
>
> If he's singing "Oh Yoko" I  might.
>
> If I buy a new Lennon CD, chances are it's going to be produced by
> Yoko or  have sleeve notes by Yoko.
>
> Many Lennon books, photos, film, etc. have Yoko's pawprints all over
> it.  She repeatedly markets John to market herself.
> Many books and films MUST have a pro Yoko slant because Yoko controls
> the estate.  Whether it's the Lennon
> Broadway show, the Lennon NYC book, Memories of John, Lennon
> Anthology, etc. the author, producer, etc. MUST portray
>  the JohnandYoko party line.
>
> So, to answer your question, whether the public likes it or not, often
> when we buy a Lennon media product, we will
> get a big dose of Yoko whether we like it or not. And I don't like it.

I've seen Yoko's interviews. My main problem is that she tends to try
to turn discussions of Lennon into discussions about herself. And she
often shows herself in a grand light and Lennon in a negative one.

But what about her album notes? Does Yoko finally manage to focus on
John and his good music there?

And the music of John's Yoko supposedly produces? Is she for once
faithful to him in this crucial area?

Jeff

10/19/2011 4:31:00 PM

0

On Oct 19, 11:12 am, Billy <billybartlet...@yahoo.com> wrote:
> On Oct 19, 11:53 am, Fattuchus <fattuc...@yahoo.com> wrote:
>
>
>
>
>
>
>
>
>
> > On Oct 19, 10:04 am, moonpie <mr_rc_moon...@yahoo.com> wrote:
>
> > > On Wed, 19 Oct 2011 01:51:54 -0700 (PDT), Fattuchus
>
> > > <fattuc...@yahoo.com> wrote:
>
> > > >With John dead, much of the negative fame became positive.  She was in
> > > >the spotlight, and IMO, she loves it.
>
> > > I cannot, for the life of me, understand this fixation with Yoko.
>
> > > When you listen to the Beatles, when you listen to Lennon sing and
> > > play guitar, do you think about Yoko?
>
> > If he's singing "Oh Yoko" I  might.
>
> > If I buy a new Lennon CD, chances are it's going to be produced by
> > Yoko or  have sleeve notes by Yoko.
>
> > Many Lennon books, photos, film, etc. have Yoko's pawprints all over
> > it.  She repeatedly markets John to market herself.
> > Many books and films MUST have a pro Yoko slant because Yoko controls
> > the estate.  Whether it's the Lennon
> > Broadway show, the Lennon NYC book, Memories of John, Lennon
> > Anthology, etc. the author, producer, etc. MUST portray
> >  the JohnandYoko party line.
>
> > So, to answer your question, whether the public likes it or not, often
> > when we buy a Lennon media product, we will
> > get a big dose of Yoko whether we like it or not. And I don't like it.
>
> I've seen Yoko's interviews.  My main problem is that she tends to try
> to turn discussions of Lennon into discussions about herself.  

You're right, It is "your problem".