Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: RFC: Self Assessment Perl

by Eily (Monsignor)
on Sep 06, 2018 at 13:40 UTC ( [id://1221878]=note: print w/replies, xml ) Need Help??


in reply to RFC: Self Assessment Perl

I also think this list is really nice, with its wide variety of aspects of perl tricks and specificities :). Indicating how critical each piece of knowledge is might be useful though? Mastering context isn't required but knowing the basics can help a lot. You can get quite good with perl without having to understand BEGIN or even the notion of compile/run time, so I was kind of surprised that this was the first question.

Where can I look this up?
Best question. Knowing what kind of information you can get out of the doc, like perlop (like operator precedence, but also all the stuff on the quote like operators), perlvar (like knowing that sometimes you change the behaviour of a function by changing a var, rather than with the parameters) should be high on the list of required knowledge.

Booleans:
There are more than four? Actually this made me realize that I didn't know the answer to that correctly, I thought that any string that "looks like a number" and is equal to 0 was false. But:
perl -E "say for grep { $_ } qw<0 00 0.0>" 00 0.0
This means that the four FALSE I can think of are "", 0, "0" and undef. I suppose the empty list might count? (Edit: actually there are two numbers that are false, int 0 and real 0.0, so I guess that's up to 6 false values?)
Also I'm not sure about the other question, is this about how perl tests truth internally, or are you expecting an answer like !!(FalseOrWrong)?

Replies are listed 'Best First'.
Re^2: RFC: Self Assessment Perl
by LanX (Saint) on Sep 06, 2018 at 14:14 UTC
    > Indicating how critical each piece of knowledge is might be useful though?

    as I said I didn't prioritize, and things are too interconnected.

    like {%h} is not only a ref to an anonymous hash but the %h is flattened inside the { LIST } operation.

    > You can get quite good with perl without having to understand BEGIN or even the notion of compile/run time, so I was kind of surprised that this was the first question.

    My colleagues have to understand modules, for that to understand they need compile-time and namespaces

    (I'm sick of all the requires into main:: in our code...)

    Variable declaration happens at compile-time, die'ing at run-time should be avoided , ... and so on.

    > Where can I look this up? ... Best question.

    yes but they also need a mental map of essential key words.

    A condensed Perlglossary would be nice, probably more explicit and with less Larry injokes.

    > Actually this made me realize that I didn't know the answer to that correctly

    Mission accomplished! :)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      I think you don't need to understand BEGIN to understand modules at a certain level. I think a useful lie is that use is just like require+->import(), and to postpone the discussion of BEGIN.

      You can always gloss over that by saying that use must appear at the top of any code.

        Not in our case, we have self-written "modules" messing around.

        And colleagues who hacked 10+ years in Perl should be confronted with the concept.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

      Maybe you could add "what are the TWO differences between use and require?" to your list of questions then.

        To be clear, I think it's important to understand what the concept of compile-time is.

        The question for BEGIN is just one possibility to activate a thought process...

        • sub declaration has compile- and run-time effects
        • my declaration has compile- and run-time effects

        The situation was that many people with different skills wanted to join a workshop, where most can't communicate what they need to know.

        I actually had to kick out one person who came unprepared and without former notice, and wanted to drag the whole workshop into his Delphi/Pascal world.

        As soon as my colleagues know at least the names of the "concepts" they will have the vocabulary to communicate without me being there.

        To give you a wider perspective, I'm just reading an important DSL book from a Java guy who constantly keeps using the word "closure" as synonym for "anonymous function" or "lambda". That's total BS, but quite common in other languages...

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-04-18 09:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found