Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: Beginner Recommendations

by soonix (Canon)
on Jan 24, 2023 at 07:14 UTC ( [id://11149804]=note: print w/replies, xml ) Need Help??


in reply to Re: Beginner Recommendations
in thread Beginner Recommendations

"Tinkering with Perl" looks like it would need an overhaul. The real tiny baby steps are good, but there's no strict, warnings, lexical scope etc.

Replies are listed 'Best First'.
Re^3: Beginner Recommendations
by Anonymous Monk on Jan 24, 2023 at 10:29 UTC
    "Tinkering with Perl" looks like it would need an overhaul. The real tiny baby steps are good, but there's no strict, warnings, lexical scope etc.

    The author explains his method in the prefaces. Those topics are far too advanced to start teaching children a language. When I learned English as a child the first day was spent learning about the letter A. We had to write A over and over again on weird green paper between horizontal lines. It took a lot of practice to get the A consistently between the lines. We did the same thing every day for all the capital letters, but only after we mastered the previous letter. Then we learned that there is another version of letters called lowercase and we had to repeat the drill of writing each lowercase letter over and over, until we got it right. There was no mention of advanced topics like vowels, consonants or punctuation at the earliest stages of language acquisition because that would confuse and bore and ruin the child's ability and desire to learn. Remember we're talking about children here, potentially very young children.

      Those topics are far too advanced to start teaching children a language.

      "Perl Baby-Talk" is perfectly fine. But speaking of "too advanced": the old ampersand-style function calling is not necessary, nor is predeclaring subroutines, in fact, sub &TellPrice(); is wrong and throws an error - the oldest Perl I have on hand is 5.6.2, so I'm not sure if it ever was legal.

      As for strict, warnings, and diagnostics, the code samples on that page include errors that would have been caught by them. $ShouldContinue == "n" would have been caught by warnings, and the following incorrect code from the page would have been caught by strict (and hinted at by warnings):

      sub ReadLine() { $UserInput = <>; chomp $userinput; return $userinput; }
      that would confuse and bore and ruin the child's ability and desire to learn

      First option: Three lines of boilerplate, a my in front of variables, and that gets you error messages like: did you forget to declare "my $userinput"?

      Second option: Figure out the bug all on your own. I personally think this is the one that would confuse and frustrate a child - just like it's frustrated quite a few adult programmers...

      Minor updates to wording.

        Here's a few relevant quotes about the author's intentions:
        "I am not trying to introduce most principles of good software engineering."

        "Well, if I am not trying to do all of that, then what am I trying to do?"

        "I am trying to do this: create a book that will help my twelve year old twin brothers learn to tinker."

        "This book is not an attempt to immediately achieve the end result of a good programmer in all regards. It has a goal which might be called more modest, but which I believe is ultimately more important: that of lighting the child's fire. Once the fire is lit, it can be tended and carefully pruned; there will be plenty of time for the channeling and discipline necessary to let the fire achieve truly great things. I am not trying to do everything; I am trying, for now, to do one thing well."

        CJS Hayward, 7-16-98

        "P.S. There are some intentional inaccuracies. This is because a fully technical treatment of the issues involved would, I believe, needlessly confuse children. Some parts are oversimplified; I intend them to be overridden by more nuanced treatments when an appropriate level of intellectual maturity is reached."

        That's how I learned Perl, by tinkering through telnet and hacking free scripts by trial and error, not even knowing about perldoc! The fire was lit. Our knowledge evolves!
      • what haukex wrote
      • OP doesn't sound like a child. Baby steps are fine, anyway, but things like my are important concepts.
      on weird green paper between horizontal lines
      the equivalent of this would be
      use strict; use warnings; use diagnostics; # training wheels ;-) use autodie;

Log In?
Username:
Password:

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

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

    No recent polls found