Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Snarky comments on the ddj perl quiz

by liverpole (Monsignor)
on Aug 23, 2007 at 01:10 UTC ( [id://634553]=note: print w/replies, xml ) Need Help??


in reply to Snarky comments on the ddj perl quiz

I'm with you!

One has to marvel at the lack of proofreading behind:

What is the simplest type of data that Perl can work with? 1. element 2. scalar 3. vector 4. component and then (in the answer section): The simplest type of data that Perl can work with is called a scalar. +Answer: C.

There wasn't any answer "C" ...?!  Oh, we're supposed to do a mental translation from numbers to letters!

There's also a typo, in question #9:

Which of the following commands should be used to open a filehandle na +med KAREN to an existing file named sw? 1. open KAREN ">sw"; 2. open KAREN, ">sw"; 3. open "sw" KAREN; 4. open ">sw", KAREN;

I didn't like any of them ... the only one that works (#2) overwrites the file "sw", whereas the question implies that the file is being opened for read access.

As does the answer (which doesn't match):

The command open KAREN, "sw"; should be used to open a filehandle name +d KAREN to an existing file named sw. Answer: B.

I've only read the first 16 of them, but it's not a test I'd be likely to use in an interview session.

Oh, and one final nit:  I always think of arrays as going horizontally from left to right, but if they are vertical, then wouldn't:

Which operator can be used to take the bottom item from an array? 1. pop 2. push 3. pull 4. plant

Have it upside-down?  If anything, push and pop should work with the top of the array, I'd think...


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: Snarky comments on the ddj perl quiz
by ysth (Canon) on Aug 23, 2007 at 01:17 UTC
    Oh, we're supposed to do a mental translation from numbers to letters!
    I think the questions and the answers are both ol lists, and somebody's browser rendered that as 1. A. B. C. D. 2. A. B. C. D. ...
    the only one that works (#2) overwrites the file "sw"
    I noticed the inconsistency between the question and answer, but somehow read the question as "<sw". That's pretty funny.
Re^2: Snarky comments on the ddj perl quiz
by djp (Hermit) on Aug 24, 2007 at 04:34 UTC
    Well for me, 'open a filehandle TO an existing file' (strongly) implies opening the file for output. 'open FROM an existing file' implies opening for input.

Log In?
Username:
Password:

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

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

      No recent polls found