Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: looking towards learning OOP

by spx2 (Chaplain)
on Sep 12, 2008 at 21:49 UTC ( #711023=note: print w/ replies, xml ) Need Help??


in reply to Re: looking towards learning OOP
in thread looking towards learning OOP

my problem with Moose is that its documentation becomes obsolete
as time passes by and it is spread(presentations,articles,cookbooks,cpan docs) all over the internet.
noone seems to understand that for it to be attractive for developers
it needs to have nicely binded documentation in one place and one place only.
if I go to #moose people are nice, but it is not nice for me to come knocking on
their door each time I hit a bump in the road just because noone took the trouble
to nicely bind and write a good documentation for the project.
and if documentation isn't enough or well written or any at all ,
they suggest to read the source code,but that would be an effort for my side
so big,that it would mean not only I am trying to learn Moose but also it's internals,
the latter of which was not my intention at all.

as a sidenote:
if I want to learn c++ it doesn't require me to understand the internals and/or read it's
source code(altough on some occasions it is useful)I just need to read the description of what each class does,it's methods,some
examples and I can start using it


Comment on Re^2: looking towards learning OOP
Re^3: looking towards learning OOP
by tsee (Curate) on Sep 13, 2008 at 09:39 UTC

    About not wanting to "bother" #moose with your beginner's issues:

    Look at it the other way around. You're a beginner and trying to learn things. You read the documentation and there's something you don't get. You ask #moose. You get a good answer. Here's what you have to do to make #moosee helping you benefit Moose: Apply small fixes to the documentation as you go along!

    I think it's Matt Trout who's been saying over and over again that as an expert, you can't reasonably write good beginner's documentation because you have no idea what the hell's so difficult about it. Conversely, if there's going to be a beginner friendly text, beginners have to be involved in the making.

    Best regards,
    Steffen

Re^3: looking towards learning OOP
by FunkyMonk (Canon) on Sep 13, 2008 at 11:16 UTC
    Yes, there's presentations and tutorials spread all over the Internet, but the official, always up-to-date, documentation is on the CPAN here. In that documentation are a set of tutorials called the Cookbook.

    There isn't much to learn about basic Moose:

    package Shape; use Moose; has color => ( # an attribute called 'color' is => 'rw', # creates an accessor for the color isa => 'Str', # and it's a string ); package Circle; use Moose; extends 'Shape'; # Circle isa Shape has radius => ( is => 'rw', isa => 'Num' ); sub area { my $self = shift; return 3.141 * $self->radius ** 2 } package Rectangle; use Moose; extends 'Shape'; # Rectangle isa Shape has width => ( is => 'rw', isa => 'Num' ); has height => ( is => 'rw', isa => 'Num' ); sub area { my $self = shift; return $self->width * $self->height; } package main; use strict; use warnings; my $r = Rectangle->new(height => 2, width => 2.5, color => 'green'); my $c = Circle->new(radius => .5, color => 'yellow'); printf "My %s is %s and has an area of %0.2f\n", ref $_, $_->color, $_ +->area for $r, $c; $c->radius(1); # The circle is now twice the size printf "My new Circle is %s and has an area of %0.2f\n", $c->color, $c +->area

    Moose just makes it so quick and easy. Of course, Moose can do so much more, but that's what the documentation is for.

    (Yes. I know. Roles would have been better)


    Unless I state otherwise, all my code runs with strict and warnings
Re^3: looking towards learning OOP
by stvn (Monsignor) on Sep 13, 2008 at 18:00 UTC
    my problem with Moose is that its documentation becomes obsolete as time passes by and it is spread(presentations,articles,cookbooks,cpan docs) all over the internet

    I disagree, if it is not in the CPAN Moose docs, then it is here, and if it not in either of those place then I don't know about it and so can't link to it. Also I am not sure how the spread and growth of information on something causes the core docs to become obsolete? If anything the core docs should always be thought of as definitive.

    noone seems to understand that for it to be attractive for developers it needs to have nicely binded documentation in one place and one place only.

    Actually, we understand that all to well, but it is a matter of people finding time. Personally i think the recently re-organized cookbooks as well as the new Moose::Intro and Moose::Unsweetened docs go a long way towards filling some of the needs you describe.

    Of course documentation always needs work, both keeping it up to date and expanding on things which are not covered as well as they could be. You simply have to stop by #moose or ask on moose@perl.org and we will be happy to give you a commit bit and you can start fixing it right away.

    as a sidenote: if I want to learn c++ it doesn't require me to understand the internals and/or read it's source code(altough on some occasions it is useful)I just need to read the description of what each class does,it's methods,some examples and I can start using it

    This is not in any way a fair comparison.

    C++ is over 20 years old (1985 or so) has the support of several major corporations (AT&T, IBM, Microsoft, etc), is an ANSI and ISO standard and got millions of dollars pumped into training, books and other forms of documentation over the last 15-20 years.

    Moose is just 2 1/2 years old and is a volunteer driven open source project with absolutely no funding, grants or anything of the like.

    -stvn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://711023]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2014-09-22 23:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (208 votes), past polls