Fishing for Perl - The New Perl User Experience
Erez Schatz
April 5, 2010 ...follow me, and I will show you how to fish for people - Matthew 4:19 Marketing Marketing
Everyone think Perl is Dead. Marketing
Everyone think Perl is Dead. Everyone think Ruby is on the rise. Marketing
Everyone think Perl is Dead. Everyone think Ruby is on the rise. Real-life wise, neither is 100% true. Marketing
Everyone think Perl is Dead. Everyone think Ruby is on the rise. Real-life wise, neither is 100% true. Marketing wise, both are 100% correct. Marketing
Everyone think Perl is Dead. Everyone think Ruby is on the rise. Real-life wise, neither is 100% true. Marketing wise, both are 100% correct. 200% even. Marketing
Ruby’s killer app is Ruby on Rails. Marketing
Ruby’s killer app is Ruby on Rails. Actually, Ruby’s killer app is Ruby on Rails’ marketing. Marketing
The Perl Foundation Marketing Committee Marketing
The Perl Foundation Marketing Committee Create a bait for many users to try Perl Marketing
The Perl Foundation Marketing Committee Create a bait for many users to try Perl May reel in many new users Marketing
The Perl Foundation Marketing Committee Create a bait for many users to try Perl May reel in many new users But... Marketing
How do we want to be seen? Marketing
DWM - dwm.suckless.org Marketing
DWM - dwm.suckless.org
“Because dwm is customized through editing its source code, its pointless to make binary packages of it. This keeps its userbase small and elitist. No novices asking stupid questions.” Marketing
DWM - dwm.suckless.org
“Because dwm is customized through editing its source code, its pointless to make binary packages of it. This keeps its userbase small and elitist. No novices asking stupid questions.”
Is this Perl? Context Context
Context dictate attitude. Context
• Meeting Context
• Meeting
• Presentation Context
• Meeting
• Presentation
• Convention Talk Context
• Meeting
• Presentation
• Convention Talk
• Chat Context
• Meeting
• Presentation
• Convention Talk
• Chat
• Mailing List New User Experience New User Experience
Give a man a fish; you have fed him for a day. Teach a man to fish; and you have fed him for a lifetime. New User Experience
Give a man a fish; you have fed him for a day. Teach a man to fish; and you have fed him for a lifetime.
Can you teach a starving man? New User Experience
Give a man a fish; you have fed him for a day. Teach a man to fish; and you have fed him for a lifetime.
Can you teach a starving man? Will he be willing to listen? New User Experience
Build a man a fire, and he’ll be warm for a day. Set a man on fire, and he’ll be warm for the rest of his life - Terry Pratchett New User Experience
Build a man a fire, and he’ll be warm for a day. Set a man on fire, and he’ll be warm for the rest of his life - Terry Pratchett
You can only make a first impression once New User Experience
• “This isn’t a Perl question” New User Experience
• “This isn’t a Perl question”
• “This doesn’t belong in this forum/list” New User Experience
• “This isn’t a Perl question”
• “This doesn’t belong in this forum/list”
• “Your code fragment is useless” New User Experience
• “This isn’t a Perl question”
• “This doesn’t belong in this forum/list”
• “Your code fragment is useless”
• “You should work on your Spelling/Grammar” New User Experience
• “Use strictures” New User Experience
• “Use strictures”
• “Don’t use C for-loops” New User Experience
• “Use strictures”
• “Don’t use C for-loops”
• “Your code isn’t formatted/indented right” New User Experience
• “Use strictures”
• “Don’t use C for-loops”
• “Your code isn’t formatted/indented right”
• “Use a module” New User Experience
You can’t just make shit up and expect the computer to know what you mean, Retardo! - Mark Jason Dominus New User Experience
• How To Ask Questions The Smart Way catb.org/˜esr/faqs/smart-questions.html New User Experience
• How To Ask Questions The Smart Way catb.org/˜esr/faqs/smart-questions.html
• What is a minimal working example? minimalbeispiel.de/mini-en.html New User Experience
• How To Ask Questions The Smart Way catb.org/˜esr/faqs/smart-questions.html
• What is a minimal working example? minimalbeispiel.de/mini-en.html
• XY Problem perlmonks.org/index.pl?node_id=542341 RTFM RTFM
Read The Fathomless Manual RTFM
Read The Fathomless Manual
• LWP::UserAgent ⇓ RTFM
Read The Fathomless Manual
• LWP::UserAgent ⇓
• HTTP::Response ⇓ RTFM
Read The Fathomless Manual
• LWP::UserAgent ⇓
• HTTP::Response ⇓ • HTTP::Message ⇓ RTFM
Read The Fathomless Manual
• LWP::UserAgent ⇓
• HTTP::Response ⇓ • HTTP::Message ⇓ • HTTP::Headers RTFM
Read The Furtive Manual RTFM
Read The Furtive Manual perldoc -f open ⇓ RTFM
Read The Furtive Manual perldoc -f open ⇓ open(FH, "<$filename") open(my $fh, ’<’, "input.txt") open(my $tmp, "+>", undef) open(my $dbase, ’+<’, ’dbase.mine’) open(ARTICLE, ’-|’, "caesar <$article") open my $oldout, ">&STDOUT" open OLDERR, ">&", *STDERR open(FILEHANDLE, "<&=", $fd) open(FH, ">>&=", OLDFH) RTFM
Read The Furtive Manual perldoc -f open ⇓ open(FH, "<$filename") open(my $fh, ’<’, "input.txt") open(my $tmp, "+>", undef) open(my $dbase, ’+<’, ’dbase.mine’) open(ARTICLE, ’-|’, "caesar <$article") open my $oldout, ">&STDOUT" open OLDERR, ">&", *STDERR open(FILEHANDLE, "<&=", $fd) open(FH, ">>&=", OLDFH)
There are So Many Different Ways of Doing it! RTFM
Read The Full-featured Manual RTFM
Read The Full-featured Manual
Read The Faithful Manual RTFM
Another form of RTFM: RTFM
Another form of RTFM:
Q: What does this line mean? $ **= $ , / {$ } / for 2 .. 42; RTFM
Another form of RTFM:
Q: What does this line mean? $ **= $ , / {$ } / for 2 .. 42;
A: perldoc perlvar RTFM
Another form of RTFM:
Q: What does this line mean? $ **= $ , / {$ } / for 2 .. 42;
A: perldoc.perl.org/perlvar.html The Socratic Method The Socratic Method
Programmers are required to think The Socratic Method
Programmers are required to think
Programming is finding answers to questions The Socratic Method
Programmers are required to think
Programming is finding answers to questions
Are we doing them harm by giving them the answers they ask for? The Socratic Method
Socrates used only oral communication The Socratic Method
Socrates used only oral communication
With very few students The Socratic Method
Socrates used only oral communication
With very few students
Who were philosophers like Plato and Xenophon The Socratic Method
Socrates used only oral communication
With very few students
Who were philosophers like Plato and Xenophon
And was executed by drinking Hemlock. What to do? What to do?
Give them the bloody answer. What to do?
Give them the bloody answer.
Then give guidance for future reference. What to do?
Sell the solution. Be Positive
Be Positive. Be Positive
Be Positive.
Don’t use XML::Simple Be Positive
Be Positive.
Use XML::Twig Be Positive
Be Positive.
Use XML::Twig Don’t use Regex to parse HTML Be Positive
Be Positive.
Use XML::Twig Use an HTML parser Idioms
Be Idiomatic. Idioms
Be Idiomatic.
But not Enigmatic. Idioms
Be Idiomatic.
But not Enigmatic.
Idioms are good. Idioms
Be Idiomatic.
But not Enigmatic.
Idioms are good.
Mnemonics less good. What to do?
Treat them as peers. What to do?
Treat them as peers. Treat them as beginners. What to do?
Treat them as peers. Treat them as Perl learners. What to do?
“...don’t hesitate to be be kind to them, and help them connect ... so that they can grow and bloom into experienced wielders of Perl.” What to do?
“...don’t hesitate to be be kind to them, and help them connect ... so that they can grow and bloom into experienced wielders of Perl.”
“But don’t hesitate to call them insane, either, when the situation calls for it.” - Carl Masak http://use.perl.org/˜masak/journal/40110 Perl and the newcomer
Perl is not intuitive Perl and the newcomer
Perl is not intuitive at first. Perl and the newcomer
• Context Perl and the newcomer
• Context
• CPAN Perl and the newcomer
• Context
• CPAN
• References Perl and the newcomer
• Context
• CPAN
• References
• TIMTOWTDI Perl and the newcomer
Principle of Least Astonishment Perl and the newcomer
Principle of Least Astonishment
“Any language that doesn’t occasionally surprise the novice will pay for it by continually surprising the expert” - Larry Wall Where to go? Where to go?
• learn.perl.org Where to go?
• learn.perl.org
• nntp.perl.org/group/perl.beginners Where to go?
• learn.perl.org
• nntp.perl.org/group/perl.beginners
• perlmonks.org Where to go?
• learn.perl.org
• nntp.perl.org/group/perl.beginners
• perlmonks.org
• strawberryperl.com Where to go?
• learn.perl.org
• nntp.perl.org/group/perl.beginners
• perlmonks.org
• strawberryperl.com
• perldoc.perl.org Where to go?
• learn.perl.org
• nntp.perl.org/group/perl.beginners
• perlmonks.org
• strawberryperl.com
• perldoc.perl.org
• search.cpan.org Thank You