Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^4: Beginner Recommendations

by haukex (Archbishop)
on Jan 24, 2023 at 11:15 UTC ( [id://11149814]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Beginner Recommendations
in thread Beginner Recommendations

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.

Replies are listed 'Best First'.
Re^5: Beginner Recommendations
by Anonymous Monk on Jan 24, 2023 at 13:58 UTC
    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!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found