develooper Front page | perl.perl5.porters | Postings from March 2011

Re: Revising Perl's OO docs - a new OO tutorial

Thread Previous | Thread Next
From:
Abigail
Date:
March 6, 2011 08:01
Subject:
Re: Revising Perl's OO docs - a new OO tutorial
Message ID:
20110306160124.GL28401@almanda
On Sun, Mar 06, 2011 at 03:39:19PM -0000, Peter Scott wrote:
> On Sun, 06 Mar 2011 04:48:57 -0600, brian d foy wrote:
> > In article <op.vrv2xhag1fclwf@xenpad>, Christian Walde
> > <mithaldu@yahoo.de> wrote:
> >> This makes me wonder about just what a "best practice" is. So far i
> >> took it to mean "behavior that is better than other related behaviors
> >> in more situations". But you seem to say it means "behavior that is
> >> better than all other related behaviors in all situations".
> > 
> > Nope, I'm not implying either of those. I'm saying that you can't say
> > "best practice" unless you specify the context. It's not a game of which
> > situations dominate. You should think very carefully about what a best
> > practice actually is before trying to recommend it to anyone else in any
> > context.
> > 
> > Basically, the practicality of "best practice" is that people use it as
> > a way to not think and to appeal to authority to win an argument. The
> > actual best practice is to figure out the benefits and costs and
> > consequences over any decision, rank those based on what's important in
> > the particular situation, and then make a judgement call. Instead, "best
> > practice" has turned into "do what I say without questioning it". A real
> > discussion of practices includes both sides-what you get and what you
> > give up. However, once given an answer, people stop thinking.
> > 
> > Peter used the word "informed" to describe the people who are telling
> > people to do it their way without knowing what the rest of the world is
> > trying to accomplish. That's an anti-best practice.
> 
> I said we should say:
> 
> (1) The most commonly agreed best practice O-O framework is Moose.
>     Here's how to use it.
> (2) A best practice is not the only practice.
> (3) Some people pick alternatives because x, y, z (including legacy).
> (4) What's going on under the hood (reference material) is: ...


I'd prefer a somewhat different list:

  1)  List commonly used OO frameworks/implementations.
  2)  For each, point out their pros and cons.
  3)  If possible, point out situations where you want to use 
      which framework, and why.

I'm very hesitant to use big words like "best practice" or "most commonly
agreed" without much data to back it up - specially when it's controversial
(as this thread alone shows).

I also think one should readers of the documentation with respect, and
asume that, given the appropriate arguments, readers can make the right
decision for their situation.

> I believe we should give people the benefit of our best judgement as to 
> what to use.  People learning something need to know where to focus their 
> attention.  It's not hard to find all the information about Perl.  What's 
> hard is knowing where to start and what you can ignore at first.  A 
> common problem when experts write documentation for beginners is that 
> they try to teach them to become experts right out of the gate.
> 
> If I go into a doctor's office and ask how to lose weight I don't want 
> him to hand me a stack of American Medical Journals and tell me I'll be 
> better off for figuring it out for myself.  I want to start with his best 
> thinking on the topic and when I've assimilated that I'll be better 
> qualified to question it.

Actually, my doctor tells me it's better for me to lose weight. She
tells me why. She tells me some ways how to do that. She tells me the
pros and cons of each way. She considers my way of life. She 1) doesn't
stick to one method she thinks works best, and tells every patient to
use that method, and 2) lets the choice be mine.

> I don't think it reflects well on the Perl community for our OO tutorials 
> to promulgate a seemingly level playing field between dozens of choices 
> and force the beginner to become an expert in framework evaluation before 
> they can write their first program.  If there's a clear front runner for 
> beginners we should say so.

They don't have to be experts if we give them the arguments. But they are
the experts on *their environment*. We cannot know. 

If their would be a clear front runner for beginners, appropriate to
most situations, we should say so, I agree. But, IMO, there isn't such
a front runner.

> 
> I agree that context matters.  We're talking about a tutorial, so the 
> context is learnability.  Performance takes a back seat.
> 
> -- 
> Peter Scott

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About